Quiting a Standalone

Marty Knapp martyknapp at comcast.net
Tue Jan 10 16:36:40 EST 2006


That works if you click the close box, but doesn't get sent if you 
select Quit from the menu.

I also tried this:

on shutdownRequest
    answer "Save data?" with "Cancel" or "Save" or "Dont Save"
    if it is "Cancel" then
        exit shutdownRequest
    else if it is "Save" then
    --do save stuff
    end if
    pass shutdownRequest
end shutdownRequest

It works, but if I select "Cancel" is exits the handler, but the next 
time I shut down, the shutdownRequest does not run - quits without 
prompting me . . .

This issue aside, it looks like I need to trap for the stack closing and 
for the Quit menu selection. I had thought that the shutdown message 
would handle both, but as i said, is unreliable when using the menu to quit.

Any wisdom for me? Thanks,

Marty Knapp

>>Thanks for your response. So where would you insert a script 
>>to ask the 
>>user to save data or not?
>>    
>>
>
>I'd go for the closestackrequest procedure.
>
>  
>



More information about the use-livecode mailing list