• 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
Quit handler not working
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Quit handler not working


  • Subject: Quit handler not working
  • From: Ken Tozier <email@hidden>
  • Date: Fri, 4 Jun 2004 21:19:15 -0400

I defined a quit handler in a "run and stay open" applet like so

on quit
Deinitialize()
continue quit
end

In my "initialize" method I'm validating the return from each command inside a try block like so

try
set prop1 to (* prop 1 initializer *)
on error
quit
end

try
set prop2 to (* prop 2 initializer *)
on error
quit
end


The "Deinitialize" method doesn't do anything fancy, just sets a few properties to ""

on Deinitialize()
set prop1 to ""
set prop2 to ""
etc...
end


The problem is, if the first try encounters an error, the quit handler doesn't actually quit the script. It goes merrily along as if nothing happened and performs the second, third, fourth try blocks. Is there a way to absolutely, no exceptions quit an applet in a situation like this?

Thanks

Ken
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Re: Activate application as hidden
  • Next by Date: Re: Documentation for "Standard Additions"
  • Previous by thread: Re: Activate application as hidden
  • Next by thread: Re: Quit handler not working
  • Index(es):
    • Date
    • Thread