'Quit' mystery

Howard Bornstein bornstein at designeq.com
Wed Nov 4 22:47:50 EST 2015


This really helped me out. Thanks Martin! I couldn't get my standalone to
quit no matter what. This did the trick.

On Tue, Nov 26, 2013 at 10:19 AM, Martin Koob <mkoob at rogers.com> wrote:

> Hi
>
> It has been a long time since I set this up in my application so I don't
> remember exactly the logic as to why I set this up this way but it seems to
> work.  The main stack has several substacks which may be open when quit is
> selected from the menu.
>
> Each of the substacks' scripts have a shutdownRequest handler but not a
> 'pass shutdownRequest' command.  This handler sends a prepareToQuit command
> to the main card of the main stack.
>
> substack stack script
> -------------------
> on shutdownRequest
>    send "preparetoquit" to card "main" of stack "mainstack"
> end shutdownRequest
> ------------------
> The main card of the main stack has the prepareToQuit handler which just
> has
> a quit command.  This triggers the shutdownRequest handler in the main
> card.
> This shutdownRequest handler has all of the code you want implemented
> before
> quitting.  This handler has the 'pass shutdownRequest' command that allows
> the application to quit.
>
> Mainstack >card "main" script
> -----------------------
> on preparetoquit
>     quit
> end preparetoquit
>
> on shutdownRequest
>     <do stuff here>
>
>     pass shutdownRequest
> end shutdownRequest
>
>
>
>
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/Quit-mystery-tp4672924p4672933.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



-- 
Regards,

Howard Bornstein
-----------------------
www.designeq.com



More information about the use-livecode mailing list