Re: Handlers first?
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