• 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: Handlers first?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Handlers first?


  • Subject: Re: Handlers first?
  • From: Don Rossi <email@hidden>
  • Date: Fri, 21 Oct 2011 19:40:35 -0400

Speaking for myself, I was taught to do that for two reasons.  First, you should preplan.  "I'm going to need a handler that wiil check for fonts in the document. I'll need a way to convert JPEG files to TIFF...". So, you write them first as way to organize and plan.

I don't know if the second reason I was taught is still true.  One of my first trainers was Cal Simone, who released Scripter ( how's that for a blast from the past ) and that was the scripting editor I used back then.  Cal taught us that a script would compile quicker when the handlers were at the beginning and it was absolutely true.  I tested it.  However, that was back in the 32 K max text days,  It also could have been true for only Scripter.  I don't know.

So I guess Shane is right again.  Personal preference, but a useful preference...  BTW, Shane is a damn good teacher also.


On Oct 21, 2011, at 6:44 PM, Shane Stanley <email@hidden> wrote:

>
> On 22/10/2011, at 9:06 AM, Robert Poland wrote:
>
>> I see many people write scripts with the handlers first then the actual script.
>>
>> Is there a reason for this?
>
> Habits from elsewhere, plus personal preference -- they'd be my guess.
>
> --
> Shane Stanley <email@hidden>
> 'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/>
>
> _______________________________________________
> 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
 _______________________________________________
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

  • Follow-Ups:
    • Re: Handlers first?
      • From: Shane Stanley <email@hidden>
References: 
 >Handlers first? (From: Robert Poland <email@hidden>)
 >Re: Handlers first? (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: Handlers first?
  • Next by Date: Re: Handlers first?
  • Previous by thread: Re: Handlers first?
  • Next by thread: Re: Handlers first?
  • Index(es):
    • Date
    • Thread