Well, I had found a couple more issues with scripter. But the issues are only in v7.23 and newer.
To reproduce both issues in Scripter IDE Demo please follow the following:
- Open the Scripter Studio Pro IDE Demo project into your IDE.
- Double Click on the PopupMenu1 VCL icon to open the Menu Designer.
- Add a new Menu Item at the bottom of the list. And give it the name Test1 and change the Caption to Test.
- Create a OnClick event for the new Menu Item.
- Load the OnClick event with the following code:
procedure TForm1.Test1Click(Sender: TObject);
var
tmpStr: String;
begin
with IDEEngine1 do
begin
with Memo do
begin
tmpStr := 'Length : '+IntToStr(Lines.Text.Length)+
' Lines : '+IntToStr(Lines.Count)+#13+
'Ln : '+IntToStr(CurY+1)+
' Col : '+IntToStr(CurX+1)+#13+
'Sel : '+IntToStr(SelLength)+' | ';
if CurY > 0 then
tmpStr := tmpStr+IntToStr((SelEndY-SelStartY)+1)
else
tmpStr := tmpStr+IntToStr(SelEndY-SelStartY);
end;
end;
MessageDlg(tmpStr, MTInformation, [mbOK], 0);
end;
- Once you have done that. Save, Build and Run the Script IDE Demo.
To see issue 1:
-
Without making any changes to the currently loaded script. Click on the Main Menu Item About.
-
Now select Test.
-
A Message Dialog window will open. Showing three lines of information:
A. Line 1: The number of characters (Length) and Lines in the script file being viewed.
B. Line 2: The current cursor position within the script file being viewed.
C. Line 3: The number of character(s) and line(s) currently selected withing the script file being viewed.Now in v7.22 and earlier Line 1 will have:
Length: 163 Lines: 9But, with v7.23 and newer Line 1 will always have:
Length: 0 Lines: 1The rest of the information displayed is correct.
-
Close the Message Dialog and the close the Demo.
To see issue 2:
- Either Select the first character in the first line of the script. Or Select the whole first line..
- Click on the Main Menu Item About.
- Now select Test.
- A Message Dialog window will open. Showing three lines if information:
- Close the Message Dialog and then close the Demo.
- Once you close the Demo you should now be presented with an infinite loop of the following error message:
---------------------------
Scripterproide
---------------------------
List index out of bounds (1)
---------------------------
OK
---------------------------
I suspect that both of the issues mentioned above. May have been created by the fixes used to fix the issues that I had mentioned earlier this year. And although the first issue is minor in nature. The second issue does seem to be a major one if it is causing that error when closing the application.
Now, there is a possible issue. But I'm not sure if it is a problem with Scripter or with Notepad++. But, I thought that I would bring it up here to get your feed back on this possible issue.
Even if Scripter is working as intended with the above code. There is a difference in what is reported by Scripter and what it reported by Notepadd++.
As I mentioned above Scripter when using the default created project. And having Unit1 being viewed. Scripter will report that there is only 163 characters and 9 lines in the script. But, if I copy and pasted the current script into Notepad++. It will report show that there is 170 characters and 9 lines in the script.
What I can not seem to figure out is if this is a difference in what characters the IDEMemo component is counting as compared to what Notepad++ is counting. Or if this is actually a issue with the IDEMemo component. Can you please shed some light on this for me please?