That looks like it would work though it isn't the variable I remember. Probably that's what changed. Nice sleuthing.

--
Jacqueline Landman Gay | [email protected]
HyperActive Software | http://www.hyperactivesw.com
On February 4, 2021 5:52:14 PM Ralph DiMola via use-livecode <[email protected]> wrote:

Is this what you're looking for?

revIDESetEdited pStackName
revIDESetUnedited pStackName

Interrogate it with: revIDEStackIsEdited pStackName

Ralph DiMola
IT Director
Evergreen Information Services
[email protected]



-----Original Message-----
From: use-livecode [mailto:[email protected]] On Behalf Of J. Landman Gay via use-livecode
Sent: Thursday, February 04, 2021 5:53 PM
To: How to use LiveCode
Cc: J. Landman Gay
Subject: Re: Close Stack Cleanup

There used to be a gREV* global variable that tracked the dirty status and if the stack was dirty it put up the "do you want to save?" dialog. I can't find it now so something has changed. When it existed, you could toggle that variable via script and the IDE wouldn't bother you.

The IDE does pass the closeStackRequest to your stack after it checks the stack status. The docs are correct that you don't get that message when a script closes the stack but you can use closeStack instead; however, first we need to find out where that variable went to. It used to be in the globals pane of the message watcher, and I'd recognize it if I saw it, but I can't remember now what it was.

On 2/4/21 12:59 PM, Bob Sneidar via use-livecode wrote:
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

_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



--
Jacqueline Landman Gay         |     [email protected]
HyperActive Software           |     http://www.hyperactivesw.com


_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode




_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to