|
Post by Stefan on Nov 16, 2014 10:35:09 GMT -5
Operating System: Windows 7 Professional SP1 - 64-bit SPFLITE Version: 8.1.4311 but had same isssue with v7
Adding a SPF_CMD statement to some macros causes endless loop effect. This is evident even if the macro fails with a syntax error after the SPF_CMD.
To reproduce, take an edit macro (e.g. from the HELP document) dim i as number for i = Get_First_Lptr to Get_Last_Lptr ' Loop through the file if Is_Data(i) then ' Doing only data lines Set_Line(i, ucase$(Get_Line$(i))) ' by the way - HELP text misses off one ')' end if next
Now add a SPF_CMD statement, e.g. SPF_CMD("BOUNDS") after the "dim" statement. Result: The macro never concludes and SPFLITE eventually presents a "Macro may be looping" OK/CANCEL box.
2ND Result: After clicking CANCEL to terminate the macro, I can interact with the SPFLITE window but can no longer type anything into any fields. No option but to stop & restart the application.
|
|
|
Post by George on Nov 16, 2014 12:47:38 GMT -5
Stefan: You're getting good at uncovering bugs. Corrected. During macro processing, the whole rest of the program has to be very careful not to attempt doing what are considered normal screen updates (like Status Bar field updates). Recent changes to other things allowed one of these to slip through. It causes all kinds of weird happenings, as you've found out. BTW, if you were attempting to restrict the range of the uppercasing done by the macro by using a BOUNDS command, it will not work. The uppercasing is done by the macro itself within the loop, and the code in there simply uppercases the entire line, it doesn't even look at the current BOUNDS setting. Not that it couldn't be made to honor the BOUNDS, but that would take additional macro code to fetch the BOUNDS values and incorporate that into the uppercasing code. If you'd like a corrected version, just download www.SPFLite.com/Files/SPFLite814320.ex_ from the web site. Rename it to SPFLite.EXE and replace the normal one in the Install folder. George
|
|
|
Post by Stefan on Nov 17, 2014 15:16:30 GMT -5
LOL. Thanks guys. I was just using the BOUNDS command as an example of an SPF_CMD to illustrate the bug. The whole thing manifested itself in a more elaborate macro which I replaced with a simple one to avoid distractions in diagnosis.
I am very impressed with the product and especially the speed with which you tackle bug reports.
Many Thanks!
|
|
|
Post by Stefan on Nov 17, 2014 15:21:55 GMT -5
Oh, sorry, I forgot to answer Robert's question about the HELP document sample macro...
HELP MACRO, then on Contents Tab - Working with the interface - Perform a simple action on all lines in a file
|
|
|
Post by George on Nov 18, 2014 11:19:19 GMT -5
Stefan: Robert: I corrected the HnD file for the next time we generate the HELP files. George
|
|