Quit Command corrupts standalone (stack called by standalone splash)
revdev at pdslabs.net
Mon Feb 26 12:32:12 EST 2018
This is the only reply of yours that I see.
On 2/26/18 4:13 AM, R.H. via use-livecode wrote:
> Thanks, Phil and Tom
> I already replied, but I cannot see my first reply to your answers.
> Did it appear in the list?
>>> "quitMe" should be sent before 'saveMe' is executed, because the 'save'
> command is blocking. It would prevent 'quitMe' from being sent until (in
> this case) 1 second after 'saveMe' has finished.
> Well, it is blocking. Issuing "quit" just quits if messages are locked.So,
> to quit before save would require not to force a quit. Right? I will test.
You're right, but that's not what my code does. It sends 'quitMe' (which
contains the 'quit') 1 second after 'saveMe' has started. As you may
know, 'send in x seconds' adds 'quitMe' to the pendingMessages queue, so
it will execute as soon as the designated time has passed AND no other
handler is running.
For what it's worth, the correction I made to my own code is still not
correct. The whole thing should look like this:
-- create a path to the 'tilde' file (which doesn't yet exist)
put (the filename of me & "~") into sMyTildeFilename
-- add 'quitMe' to the pendingMessages
send "quitMe" in 1 second
-- save this stack
set the cursor to watch
save me -- creates the tilde file at beginning, deletes it at end
-- wait until tilde file is gone, then quit
if there is a file sMyTildeFilename -- 'save' has not completed yet
then -- try again later
send "quitMe" to me in 0.5 seconds
> The main problem is that the IDE is ok, even though saving takes a long
> time, but no errors I can see. The standalones are the culprit, and I have
> limited to access to other peoples computers using my standalones. And on
> my machine the problem does not appear regularly.
> // I hope this message appears, otherwise I will have to check what is
> wrong sending messages to the list. //
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode