quiting and close stack message
bobs at twft.com
Wed Dec 8 17:12:23 EST 2010
Oh hey I didn't think about trapping for the menuPick and command key. Good idea.
On Dec 8, 2010, at 1:27 PM, FlexibleLearning wrote:
> As I said, 'quit' is non-negotiable. Trap a closeStackRequest in the main
> stack's card script and offer the option to abort...
> --| Main stack, card script
> on closeStackRequest
> end closeStackRequest
> --| Main stack, stack script
> on checkQuit
> answer "Are you sure you want to quit?" with "Yes" or "No"
> if it="Yes" then quit
> end checkQuit
> You can use the same handler in your File menu...
> on menuPick which
> if which="Quit" then checkQuit
> end menuPick
> and in your shortcuts handler thus...
> on commandKeyDown pKey
> if pKey="Q" then checkQuit
> end commandKeyDown
> Hugh Senior
> Hi Hugh. CloseStackRequest does not prevent quitting in the IDE. It appears
> nothing does. I suspect however that it would work in a standalone. I will
> test that shortly.
> On Dec 8, 2010, at 11:25 AM, FlexibleLearning wrote:
>> 'quit' cannot be terminated once issued. See 'closeStackRequest' instead
>> Hugh Senior
>> How do you get an answer dialogue to halt the quit process? If you have a
>> "close stack" handler and it has a "do you really want to quit?" dialogue
>> and you quit the livecode application you see that answer message flash
>> a second but it doesn't halt the quit process.
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode