1 (edited by teco049 2017-07-28 07:29:53)

Topic: Index Problem, Script Editor problem

Hi to all,


I have the problem, that sometimes when I select a line at a datagrid I get the error "Index out of bounds" but everything seems to work.
When I select the same line again, no errormessage comes.
Has anybody else this problem?


I use a lot of scripts because I need some test and other things in the background.
At the current application I have around 1000 lines and approx. 35% are still not done.


Is there any known limit in size for a scipt? The script.dcu has a size of 200kb, the scipt.pas a size of 47kb and the forms.xml is 319kb.


The scipt editor show normal a symbol to colape a procedure. At the large scipt this symbol is missing.


Any way to get it back? I have 45 procedures and not colapsing the procedures I am not currently editing makes it confusing to locate the current position in the bulk of procedures.


Thank you for help in advance.


Edit: I am using Version 3.4

Post's attachments

Attachment icon colapse.png 1.29 kb, 239 downloads since 2017-07-28 

2 (edited by mathmathou 2017-07-28 19:05:19)

Re: Index Problem, Script Editor problem

Hello teco,


I don't have all your answers but :


Regarding the script size and limits : I'm well over 12.000 lines of script and it work without problems. The script.pas size is 600Ko and the script.dcu is 2,3Mo and it works.


Regarding the error message : I had the same one with v3.5b biut the situation was special. On my form there was :
- a tablegrid
- a few SQL query buttons
this worked until I hadded a combobox filled by script like this :

folder_reading.ComboBox3.Clear;
    folder_reading.ComboBox3.Items.add('DIM files (IMxxxx.zip)');           //index0
    folder_reading.ComboBox3.Items.add('Exe files (old DAZ sku format)');   //index1
    folder_reading.ComboBox3.Items.add('Rar files');    Index2
    folder_reading.ComboBox3.ItemIndex := 0;

This addition triggered the "Index out of bound (0)" when a SLQ Query button was clicked.


Getting ride of the last line

folder_reading.ComboBox3.ItemIndex := 0;

made the error disappear

Just in case you were in the same situation and this could help you.


Cheers


Math

I'm a very good housekeeper !
Each time I get a divorce, I keep the house

Zaza Gabor

Re: Index Problem, Script Editor problem

teco049 wrote:

Hi to all,


I have the problem, that sometimes when I select a line at a datagrid I get the error "Index out of bounds" but everything seems to work.
When I select the same line again, no errormessage comes.
Has anybody else this problem?


Please attach your project and describe steps to reproduce the error.



teco049 wrote:

I use a lot of scripts because I need some test and other things in the background.
At the current application I have around 1000 lines and approx. 35% are still not done.


Is there any known limit in size for a scipt? The script.dcu has a size of 200kb, the scipt.pas a size of 47kb and the forms.xml is 319kb.

There is no any limits.



teco049 wrote:

The scipt editor show normal a symbol to colape a procedure. At the large scipt this symbol is missing.


Any way to get it back? I have 45 procedures and not colapsing the procedures I am not currently editing makes it confusing to locate the current position in the bulk of procedures.


Thank you for help in advance.


Edit: I am using Version 3.4

Unfortunately script editor starts work to slow with collapse symbol, so this feature will automatically disabled when you code more that 1000 lines.

Dmitry.

Re: Index Problem, Script Editor problem

Dear Dimitry,

Thank you for the answers.


I will try to create the error message stable and reproducable. At the moment it comes occassionaly without a fixed situation.


Could you please so kind and create an option to enable the colapse symbol also with large scipts. Even it would slow down everything, sometimes it is usefull to have it slow but only one of the procedures open to prevent changes in wrong procedures by accident.


Thank you.

Re: Index Problem, Script Editor problem

teco049


please download latest beta version
https://www.dropbox.com/s/4rfukqr2r1awq … b.zip?dl=0


now you can enable code folding in the context menu of script editor.

Dmitry.

Re: Index Problem, Script Editor problem

Thank you Dmitry.