Close Stack Cleanup

Bob Sneidar bobsneidar at iotecdigital.com
Thu Feb 4 13:59:05 EST 2021


Hi all. 

I know we have tread this ground before, but I am trying to clean up my stack (i.e. clear the fields), then save it when I close it BY ANY MEANS. That means by script, by menu OR by clicking the red dot (of for WIN users the red X) in the title bar. I need this to work in the IDE as well as in standalone. 

You would think closeStackRequest gets sent when I click the red dot or X. You would be mistaken. 

The dictionary reads, 

The closeStackRequest message is only sent if the request to close a stack is initiated by the user (eg by clicking file -> close in the LiveCode menu). If the request is initiated from a script (eg "close this stack" ) then the closeStackRequest message is not sent.

Apparently clicking the red dot is not considered, “initiated by the user.” It ought to be. 

If I use “CloseStack” instead, I cannot save the stack because a script is currently running, and I do not want to be presented with the dialog to save, do not save, or cancel. I just want it to be saved. I can force quit if I mess something up. 

Bob S



More information about the use-livecode mailing list