• 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
when quit is not quit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

when quit is not quit


  • Subject: when quit is not quit
  • From: Don and/or Judi Hall <email@hidden>
  • Date: Fri, 2 Nov 2001 00:35:32 -0700

Why does the dialog "returned from handleError" appear even though this
handler has a quit statement in it in the test script below?

Here is the sequence of events:
1. dialog in handleError appears, and I dismiss it.
2. dialog in quit appears, and I dismiss it.
3. "returned from handleError" dialog appears and I dismiss it.
4. "beep" sounds and there is a one second delay
5. app quits

Is there any way to get around this? I do not want my script to continue
executing statements after the call to quit in handleError.

Thanks for any advice,

Don

-- quit test --
-- save this as a stay open application and run from Finder

on run
set errMsg to "test message"
set errNum to -1
handleError(errMsg, errNum)
display dialog "returned from handleError" buttons {"OK"} default
button 1
beep
delay 1
end run

-- error handler --------------------------------------------------------
to handleError(errMsg, errNum)
activate me
beep
display dialog "error number " & errNum & ":" & return & errMsg &
return ,
buttons {"Quit"} default button "Quit" with icon stop
quit
end handleError

-- quit handler -- runs when program receives a quit
message -------------------------
on quit
display dialog "quitting"
continue quit
end quit


  • Follow-Ups:
    • Re: when quit is not quit
      • From: Jon Pugh <email@hidden>
  • Prev by Date: Applescript CGIs with Web* V
  • Next by Date: Re: Arcane date smarts
  • Previous by thread: Re: Re: Applescript CGIs with Web* V
  • Next by thread: Re: when quit is not quit
  • Index(es):
    • Date
    • Thread