• 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
Best practices- nested loops or handlers or both
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Best practices- nested loops or handlers or both


  • Subject: Best practices- nested loops or handlers or both
  • From: Eric Geoffroy <email@hidden>
  • Date: Mon, 01 Nov 2004 10:03:20 -0800

d is date in list
Loop 1 tests d and if it's a weekend, bumps it to next day.
Loop 2 tests d and if it's a holiday, bumps it to next day.

Now those two loops need to be nested in case loop 2 moves d to a weekend.

I'm really struggling with the handler concept but here goes-

If d is weekend then do myhandler1
if d is holiday do myhandler2

myhandler1
bump d to next day
do myhandler2
end

myhandler2
bump d to next day
do myhandler1
end


Am I in the ballpark? Am I holding a hockey stick standing on the 9th tee during the first quarter of the scrum?


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Best practices- nested loops or handlers or both
      • From: "Adam K. Wuellner" <email@hidden>
  • Prev by Date: Re: Adding files to AppleScript Studio Application
  • Next by Date: Re: Best practices- nested loops or handlers or both
  • Previous by thread: Re: Adding files to AppleScript Studio Application
  • Next by thread: Re: Best practices- nested loops or handlers or both
  • Index(es):
    • Date
    • Thread