A couple more issues in Scripter

As I had mentioned in my post in the other thread. There is a couple of additional issues with the Scripter.

For Issue #1 and #2 perform the following with the IDE Demo:

  1. Create 4 script files with what ever code you want.
  2. Save each of them with a different filename.
  3. Then from the Menu bar select File > Save Project as to save the project.
  4. Run a second IDE Demo and create a another script file.
  5. And save it into the same directory as your project files.

Now to see Issue #1 in action:

  1. With the first IDE Demo. Load the new script file that is not in the project.
  2. After you load the additional script file. Close that file with the File > Close File.
  3. Now save the project with the File > Save Project as and save the project with a 1 after the project name. ie project becomes project1
  4. Now open the new project ssproj file into your favorite text editor.

What you will see is that even though you only have 4 script unit files loaded in the IDE. Saving the project with Save Project as save a project with 5 script files. The additional script file added to the project. Is the script file that you had loaded and then closed.

This problem also occurs if you use the Save All button from the button bar. And I have have had it happen that multiple script files that I had opened in the IDE Demo, for editing, and then had closed before making sure that the project is re-saved with current project files.

It seems to me that the problem is that Close File is not removing the that it had just closed from the Script Collection.

To see Issue #2 IDE Demo perform the following:

  1. Using the second IDE Demo that you have currently running.
  2. Load the third (3rd) script file from the project.
  3. Edit the uses clause to add the name of the fifth (5th) script file.
  4. Save the edited script file.
  5. Close both of the IDE Demos.
  6. Open a new IDE Demo.
  7. Load the original project file.
  8. If you should look at the third script in the project. You will see that it does have the fifth script file included in its use clause.
  9. Now click on the Save all button.

Now, what you should see is that the Editor will eventually change to the third script file. Display a red line across the libraries in the uses clause. With the cursor is at the end of the name of the library being included. In this case the fifth script file. But, there is no error message given. Just the red line.

I should note that I have made sure that the UseScriptFiles := True. And I have gone as far as to add the complete path to the files within project to the LibOptions > Search Path prior to building the IDE Demo.

NOTE: this is the only time that you see this issue. If you are able to save the project by the File > Save Project as prior to using the Save All. This problem goes away. If you initially load another project. And then load this project, then you do not have this issue.

Let me know what you think of the two issues.

Thanks @Hagin_Michael, we will analyze all that and get back to you here.