Ask to Save
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Ask to Save
While working in the IDE, what is it that causes the message "Do you want to save changes to stack "XXX" and all other stacks in the file "XXX" before closing?". Some stacks always ask even when you have done nothing to them. Is there a way I can force that to be quiet? I have a stack that I often open because it contains cards with code samples. The stack doesn't even have open and close scripts. If I just open it and then close it I get asked if I want to save.
Thanks,
Larry
Thanks,
Larry
Re: Ask to Save
Hi.
Trap the "saveStackRequest" message in the stack script. The save will not take place unless this message makes it to the engine.
Craig Newman
EDIT.
Hmmm. This does not actually prevent the dialog, only prevents saving.
Trap the "saveStackRequest" message in the stack script. The save will not take place unless this message makes it to the engine.
Craig Newman
EDIT.
Hmmm. This does not actually prevent the dialog, only prevents saving.
Re: Ask to Save
Well, here is a kluge.
In the stack script, in an "openStack" handler:
This will save the stack automatically each time you open it. But it costs you nothing, especially if you close your eyes. and if you really do not do anything but navigate the stack will not try to save yet again.
Craig
In the stack script, in an "openStack" handler:
Code: Select all
on openStack
save this stack
end openStack
Craig
Re: Ask to Save
Thanks Craig - the 'save' works like a charm. I'm OK with kluges, I just thought there would be something more elegant. Does this problem ever happen to anyone else? I see it every once in a while.
Larry
Larry
Re: Ask to Save
Larry,lohill wrote: I just thought there would be something more elegant.
Larry
You might look at setting your stack as a plugin...
Thierry
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
Re: Ask to Save
Thanks Thierry,
I had never tried that before but I made it a user plug-in and it does just what I want.
Larry
I had never tried that before but I made it a user plug-in and it does just what I want.
Larry