• 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: Why put all handlers at the top of the script?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why put all handlers at the top of the script?


  • Subject: Re: Why put all handlers at the top of the script?
  • From: Christopher Stone <email@hidden>
  • Date: Fri, 20 Mar 2015 14:15:32 -0500

On Mar 20, 2015, at 09:46, S. J. Cunningham <email@hidden> wrote:
>
> I'm guessing it makes it a little faster to compile but I have the time.  In fact,  I probably waste more time than I save by having to scroll to the bottom of the script every time I want to edit it.  Is there any compelling reason for this practice?
______________________________________________________________________

Hey Steve,

If memory serves...

A long time ago handlers that were declared after the main script HAD to be in order of execution.

E.g. a hander that was called in another handler had to be declared before the handler that called it.

But.

If the handlers were declared BEFORE the main script this was not a problem.

I got in the habit of writing scripts this way (handlers at top) and only a few years ago started putting them at the bottom.

--
Best Regards,
Chris


 _______________________________________________
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


References: 
 >Why put all handlers at the top of the script? (From: "S. J. Cunningham" <email@hidden>)

  • Prev by Date: Re: Why put all handlers at the top of the script?
  • Next by Date: Re: Why put all handlers at the top of the script?
  • Previous by thread: Re: Why put all handlers at the top of the script?
  • Next by thread: Re: Why put all handlers at the top of the script?
  • Index(es):
    • Date
    • Thread