I have a server app (standalone) I have been asked to confirm on quit, but can't figure out what should be simple.
Initially tried in closeStack->exit closeStack... no good..
...then found closeStackRequest, but that only works when physically closing the stack's window (Quit menu item still shuts it down).
So how does one do this in LiveCode?
Thanks.
Intercepting Quit?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Intercepting Quit?
Have you tried "close this stack" instead of "quit"?
I'm sure you get a closeStackRequest then.
Simon
I'm sure you get a closeStackRequest then.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Intercepting Quit?
My problem is the Quit command in the Application menu (or task switcher). Nothing seems to preempt that.
Re: Intercepting Quit?
Hi,
Do you mean that you have created an app based on LiveCode Server, or do you mean that you have created a faceless app that is started e.g. from the commandline with the -ui option or do you mean that you have a GUI app that functions like a server?
A script that is executed by LiveCode server just exits when it is completed. I don't think that intercepting quit makes sense.
A faceless app just quits when it finishes too, unless it is started as a process. Why would you want to intercept the quit command in such an app?
A GUI app is able to intercept the quit command using the shutdownRequest message. If you don't pass the shutdownRequest message, the standalone won't guit.
Kind regards,
Mark
Do you mean that you have created an app based on LiveCode Server, or do you mean that you have created a faceless app that is started e.g. from the commandline with the -ui option or do you mean that you have a GUI app that functions like a server?
A script that is executed by LiveCode server just exits when it is completed. I don't think that intercepting quit makes sense.
A faceless app just quits when it finishes too, unless it is started as a process. Why would you want to intercept the quit command in such an app?
A GUI app is able to intercept the quit command using the shutdownRequest message. If you don't pass the shutdownRequest message, the standalone won't guit.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Intercepting Quit?
Thanks Mark... shutdownRequest is what I was looking for.