• 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
Repeat-Handler-Cancel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Repeat-Handler-Cancel


  • Subject: Repeat-Handler-Cancel
  • From: Brad Giesbrecht <email@hidden>
  • Date: Sun, 18 Mar 2001 11:34:37 -0800

Hi list,

I am struggling with this problem.
I have some repeats that call some handlers.
In these handlers I have some dialogs.
When I click cancel in these dialogs, my repeat continues.
I had this problem solved by setting some variable but
I was trying to clean up my code and I figured there was
a better way to do this.

<snip>

on processItems(theseItems)
try
tell application "Extensis Portfolio 5.0.1" to activate
repeat with i from 1 to count of theseItems
if limit is true then pauseDialog()
end repeat
on error m number n
set h to "processItems" as string
errorDialog(h, m, n)
end try
end processItems

on pauseDialog()
try
set setOpt to the button returned of (display dialog "Stuff"
{"Cancel", "Options", "Continue"} default button "Continue" with icon 1)
on error m number n
set h to "pauseDialog" as string
if n = -1712 then --If I timeout, reinitiate me.
pauseDialog()
else if n  -128 then
errorDialog(h, m, n)
end if
end try
set limit to false as boolean
end pauseDialog

on errorDialog(h, m, n)
display dialog h & return & m & return & n
end errorDialog

<end snip>

Thanks,
Bradley Giesbrecht


  • Prev by Date: Re: Text Item Delimiter error
  • Next by Date: Re: How to use delimiters in Standard Additions file read/write
  • Previous by thread: Saving list/records/etc
  • Next by thread: Re: How to use delimiters in Standard Additions file read/write
  • Index(es):
    • Date
    • Thread