Page 1 of 1

Shutdownrequest getting lost with substacks

Posted: Tue Apr 30, 2013 1:47 pm
by digitalopps
Hi all,

I've got a shutdown request handler that used to work fine in my standalone application. However, I've added two new stacks that appear as popups, with their own, unique menu bars - and now the app won't quit. The handler is as follows:

on shutdownRequest
showQuitMessage
dosave
hideQuitMessage
closeEverything
pass shutdownRequest
end shutdownRequest

If I launch the standalone and don't open a popup stack, it quits fine. But after either or both of the popup stacks have opened, it fails to quit.

I've used some alert messages to trace how far it gets: two lines into the showQuitMessage handler and thats it.

I've read that shutdown request can be tricky when using substacks and I've tried putting the above handler in the back, but it made no difference.

Anyone got any ideas?

Re: Shutdownrequest getting lost with substacks

Posted: Tue Apr 30, 2013 2:11 pm
by dunbarx
Hi.

I cannot see why this would matter, but does it make any difference at all if, in your two substacks, you write:

on shutDownRequest
pass shutDownRequest
end shutDownRequest

and see if the message makes it to those handlers? Certainly for some reason it is being waylaid.

Craig Newman

Re: Shutdownrequest getting lost with substacks

Posted: Tue Apr 30, 2013 2:27 pm
by digitalopps
Hi Craig,

Thanks for the idea, sadly it made no difference.

I've tried putting all the stack scripts into a button, then loading that into the back on preOpenstack - but when I try that none of my onscreen buttons etc. can find their handlers. (I thought scripts in the back were accessible to everything?)

Any other ideas appreciated...

Re: Shutdownrequest getting lost with substacks

Posted: Tue Apr 30, 2013 2:31 pm
by digitalopps
Some more info - if I launch the standalone and quit without opening a popup stack, it quits but doesn't pass the shutdown request to the other stacks (presumably because they're not active?)

If I open either stack, the app no longer quits but the shutdown request still doesn't get to them.