correction: shutDownRequest HANDLER fails to work

Barry Levine themacguy at macosx.com
Fri Sep 5 21:31:00 EDT 2003


Thierry,

I've done exactly that. The main stack (the one where the engine is 
attached) never executes that handler. I've tried it two ways:

1. shutDownRequest handler in main stack only. Result: totally ignored.

2. shutDownRequest handler in both main stack and "third" stack where 
the Quit item would be chosen. Result: first time handler runs (from 
substack); second time, totally ignored in both stacks.

3. Compile Distribution with "third" stack only. (Note I do not use the 
term "substack because these are separate files - each with its own 
main stack. When I compile, I make the splash stack the "main" one, and 
then added in the "sign-in" stack which then calls the "third" stack 
(the "main one" from the user's perspective as that is where he sits 
99% of the time.) The shutDownReuest handler in in the stack script of 
this stack. Result: Works perfectly.

When I compile this for Windows, the menu is in the window, of course. 
The menuPick handler has EXACTLY the same code as the OSX app's 
shutDownRequest handler (which, of course, has been commented out when 
I do this for Windows). Result with all three stack files in the manner 
I require for my app: Perfection.

I have another suspicion which I will test now.

Regards,
Barry

On Friday, Sep 5, 2003, at 16:16 America/Denver, Thierry wrote:

> Subject: Re: correction: shutDownRequest HANDLER fails to work
> From: Thierry Arbellot <thierry.arbellot at wanadoo.fr>
> To: use-revolution at lists.runrev.com
> Reply-To: use-revolution at lists.runrev.com
>
> you can try the following:
>
> Create one shutdownRequest handler in the substack
> and another in the main stack.
> Change the answer message to know which handler is run.
>
> The first time you try to quit, the handler in the substack is run, but
> from the 2nd time, the handler in the main stack is run.
>
> Hope it helps.
>
> Thierry.




More information about the use-livecode mailing list