LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
Christo777
- Livecode Opensource Backer

- Posts: 13
- Joined: Thu Nov 16, 2006 4:34 am
Post
by Christo777 » Fri Jun 29, 2012 2:10 am
Hi,
when I quit my standalone app, this code should execute but it does not. It is in the script of the main stack.
Have an idea ? tx
Code: Select all
on shutdownRequest
answer question "Are you sure you want to quit?" with "Yes" or "No"
if it is "Yes" then
send closecard to card 1 of stack "Sans titre"
pass shutdownRequest -- allow to quit
else
answer "we don't quit"
end if
end shutdownRequest
I just found that if I issue a Quit command from a button, the previous script does execute ! But if the user chooses Quit MyApp from the App menu, it does not. How do I trap this ??
-
Christo777
- Livecode Opensource Backer

- Posts: 13
- Joined: Thu Nov 16, 2006 4:34 am
Post
by Christo777 » Sat Jun 30, 2012 3:29 am
I can try that but that would solve only half of the problem (on MacOS only).
For the other platforms, can I trap the "Quit" menuitem in my File menu button ?
I really would want to know why my handler doesn't catch the request.
Should I put this question in another topic of the forum ?
Thank you