• 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: get handler name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: get handler name
      • From: John W Baxter <email@hidden>
  • Prev by Date: OS X List
  • Next by Date: Re: Using 'Repeat'
  • Previous by thread: Re: Re: get handler name
  • Next by thread: Re: get handler name
  • Index(es):
    • Date
    • Thread