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:
- Create 4 script files with what ever code you want.
- Save each of them with a different filename.
- Then from the Menu bar select File > Save Project as to save the project.
- Run a second IDE Demo and create a another script file.
- And save it into the same directory as your project files.
Now to see Issue #1 in action:
- With the first IDE Demo. Load the new script file that is not in the project.
- After you load the additional script file. Close that file with the File > Close File.
- 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
- 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:
- Using the second IDE Demo that you have currently running.
- Load the third (3rd) script file from the project.
- Edit the uses clause to add the name of the fifth (5th) script file.
- Save the edited script file.
- Close both of the IDE Demos.
- Open a new IDE Demo.
- Load the original project file.
- 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.
- 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.