• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Quit Handler... What Am I Missing Here?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quit Handler... What Am I Missing Here?


  • Subject: Re: Quit Handler... What Am I Missing Here?
  • From: "S. J. Cunningham" <email@hidden>
  • Date: Wed, 11 May 2011 19:36:51 -0400

On May 11, 2011, at 3:50 PM, Luther Fuller wrote:

> On May 11, 2011, at 2:40 PM, S. J. Cunningham wrote:
>
>> Just a clarification:  all the "try's" and "display dialogs" were to help me try to figure out what is going on.  My understanding is that I should see nothing after executing "continue quit".  The fact that I do is the problem.
>>
>> That is to say the simple script:
>>
>>> on run {}
>>> 	quit
>>> 	display dialog "Whoops! Statement following quit in run handler"
>>> end run
>>>
>>> on quit {}
>>> continue quit
>>> end quit
>>
>>
>> Should never display the "Whoops" message and yet it does when compiled as an application.  Thus, if I change the run handler to be an infinite loop, I can't quit the application from the application's menu.
>
> And I'm thinking you should never explicitly call the 'quit' handler from the 'run' handler. The 'run' handler, when completed, always goes to the 'quit' handler, if it's there. In other words ...
>
> 	on run
> 		-- do stuff
> 		--> quit handler
> 	end run

Well, this doesn't work either.  When you select "quit" from the Application menu, it just keeps running:

-- Simple quit test

on run {}
	repeat while (true)
	end repeat
	display dialog "Whoops! Statement following quit in run handler"
end run

on quit {}
	continue quit
end quit
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Quit Handler... What Am I Missing Here?
      • From: "Stockly, Ed" <email@hidden>
    • Re: Quit Handler... What Am I Missing Here?
      • From: Luther Fuller <email@hidden>
References: 
 >Quit Handler... What Am I Missing Here? (From: "S. J. Cunningham" <email@hidden>)
 >Re: Quit Handler... What Am I Missing Here? (From: "S. J. Cunningham" <email@hidden>)
 >Re: Quit Handler... What Am I Missing Here? (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: Manipulating System Clock
  • Next by Date: Re: Quit Handler... What Am I Missing Here?
  • Previous by thread: Re: Quit Handler... What Am I Missing Here?
  • Next by thread: Re: Quit Handler... What Am I Missing Here?
  • Index(es):
    • Date
    • Thread