markdwags / Razor

Razor is a free tool designed to help with simple tasks while playing Ultima Online.
https://www.razorce.com
GNU General Public License v3.0
134 stars 90 forks source link

[BUG] ClassicUO: "Reload all scripts" does not reload external changes #187

Closed gdavis closed 1 year ago

gdavis commented 2 years ago

Summary I am trying to use an external text editor to edit scripts for usage on UO Outlands so I don't have to use the small native window, or the buggy popout editor that consistently crashes and becomes unusable.

I have installed Visual Studio Code to edit files. When saving a change in that editor, or any other external editor, then using the "Reload all scripts" option in the scripts list, the changes in the script are not updated in the client. It will find new files and folders the first time it is reloaded, but if any changes are made to those scripts outside of the Razor client the scripts will not update. The old version is cached in Razor, and running an edited script only uses the previously cached version.

Steps to reproduce

  1. Open Razor
  2. Open an existing .razor script file in Razor
  3. Open the same existing script in an external editor outside of Razor
  4. Change the script in the external editor and save
  5. Right click the scripts list in Razor and select "Reload all scripts"
  6. Observe that Razor does not refresh the editor window with the changes made externally.

Expected Results I would expect that Razor not only finds new files and folders when using the "Reload all scripts" action, but also finds changes to files that have been made externally, and refresh the editor window to show these changes.

I expect a "Reload script" option to check the script file for changes from when it was originally cached, and update the UI with the latest version of the file.

What actually happened Razor shows the version of the script from when it was first displayed in the internal editor. Making a change within Razor to the existing script will overwrite any changes made externally, as the cached version overwrites the file

markdwags commented 2 years ago

Do you have any info on the buggy popout editor that consistently crashes and becomes unusable. -- any errors or crash logs? I haven't seen any reports of that.

gdavis commented 2 years ago

@markdwags I opened a new issue for this crash here: https://github.com/markdwags/Razor/issues/188