Hi all,
I am working on some custom behaviours for the Procedure Editor (e.g. pressing CTRL-SHIFT-X will run a COMPILE XREF on the current file; if the cursor is on a file-name, pressing F5 will open that file; etc).
For a lot of these behaviours, it is useful for me to obtain the text on the nth line of the editor. I have written a program to return this. In essence, this program will return
ENTRY ( n, EDITOR:SCREEN-VALUE, CHR(10) )
which works a treat.
However... (there's always a "however")
A number of the programs that I work on are ridiculously large (max: around 280 KB*). When I try to reference EDITOR:SCREEN-VALUE under these circumstances, I get a bit of "DITEM is not large enough to hold strong. (4043)".
I've seen it suggested elsewhere on progresstalk** to use EDITOR:INPUT-VALUE, but the results are exactly the same.
I have tried using EDITOR:SAVE-FILE () to write the contents of the editor to a temporary file, then IMPORTing n lines, but this is much too slow.
I've also tried using the EDITOR:SET-SELECTION(), EDITOR:EDIT-COPY() and the CLIPBOARD handle, but with no real success.
Any suggestions?
Thanks in advance.
Dayne
* Admittedly, this one is a .w, and so in all likelihood I would be working on it in the Section Editor, which would circumvent this problem. But the general problem still holds.
** And now I can't find it regardless of how hard I search - apologies
I am working on some custom behaviours for the Procedure Editor (e.g. pressing CTRL-SHIFT-X will run a COMPILE XREF on the current file; if the cursor is on a file-name, pressing F5 will open that file; etc).
For a lot of these behaviours, it is useful for me to obtain the text on the nth line of the editor. I have written a program to return this. In essence, this program will return
ENTRY ( n, EDITOR:SCREEN-VALUE, CHR(10) )
which works a treat.
However... (there's always a "however")
A number of the programs that I work on are ridiculously large (max: around 280 KB*). When I try to reference EDITOR:SCREEN-VALUE under these circumstances, I get a bit of "DITEM is not large enough to hold strong. (4043)".
I've seen it suggested elsewhere on progresstalk** to use EDITOR:INPUT-VALUE, but the results are exactly the same.
I have tried using EDITOR:SAVE-FILE () to write the contents of the editor to a temporary file, then IMPORTing n lines, but this is much too slow.
I've also tried using the EDITOR:SET-SELECTION(), EDITOR:EDIT-COPY() and the CLIPBOARD handle, but with no real success.
Any suggestions?
Thanks in advance.
Dayne
* Admittedly, this one is a .w, and so in all likelihood I would be working on it in the Section Editor, which would circumvent this problem. But the general problem still holds.
** And now I can't find it regardless of how hard I search - apologies