Re: get handler name
Re: get handler name
- Subject: Re: get handler name
- From: "Arthur J Knapp" <email@hidden>
- Date: Mon, 26 Mar 2001 10:05:22 -0500
>
Date: Sat, 24 Mar 2001 07:00:12 -0500
>
Subject: Re: get handler name
>
From: Jason Bourque <email@hidden>
>
> On 3/22/01 5:03 PM, Jason Bourque <email@hidden> wrote:
>
>
>
>> I just wrote this handler that lists the handlers in a script. Let me know
>
>> how it works out.
>
>
>
> on handlerLister()
>
> set myScriptText to me as text
>
>
>
> --> Can't make +script; into a string.
"script" as "anything" is a coercion of the scripting addition
Jon's commands.
>
Hmmmm, what is wrong with your AppleScript?
Jon's wonderful commands are so prevelent within the scripting
community that many people do not realize that it's commands and
coercions aren't a part of the core AppleScript langauge itself.
Coercions are especially troublesome, since most scripting
addition dictionaries don't even list the coercions that they
perform.
on doSomething()
-- whatever
end doSomething
on getHandlerName(hand)
try
err of hand
on error errmsg
-- "Can't get err of +handler doSomething;."
return text 27 thru -3 of errmsg
end try
end getHandlerName
getHandlerName(doSomething)
--> "doSomething"
Arthur J. Knapp
http://www.stellarvisions.com
mailto:email@hidden
Hey, check out:
http://www.AppleScriptSourceBook.com