• 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: Jed Verity <email@hidden>
  • Date: Thu, 22 Mar 2001 15:17:32 -0800

I usually set a global variable to the handler name on each run to make the
handlerName accessible from any execution context. Not pretty but it works.

For example:

------begin script
global handlerName

on handlerOne()
set handlerName to "handlerOne"
...
end

on handlerTwo()
set handlerName to "handlerTwo"
...
end
------end script

HTH,
Jed

On 3/22/01 3:00 PM, you wanted me to know this:

> On 3/22/01 2:02 PM, Brad Giesbrecht <email@hidden> wrote:
>
>> Is there a way to get a handler's name?
>>
>> <snip>
>> on handlerName()
>> try
>> on error
>> set h to -- code that will return "on handlerName()"
>> end try
>> end handlerName
>
> You can fake it:
>
> on handlerName()
> try
> set foo to foo + 1 --create an error condition
> on error
> return "handlerName"
> end try
> end handlerName
>
> --Michelle
>
> ----------------------------------------------------------------------
> | Michelle Steiner | We're not human beings having a spiritual |
> | | experience. We're spiritual beings |
> | email@hidden | having a human experience. |
> ----------------------------------------------------------------------
> _______________________________________________
> applescript-users mailing list
> email@hidden
> http://www.lists.apple.com/mailman/listinfo/applescript-users


~)~)~)~)~)~)~)~)~)~)~)~)~)
Jed Verity


References: 
 >Re: get handler name (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: FileMaker ARGH!!!!
  • Next by Date: Re: Unloading Coercions
  • Previous by thread: Re: get handler name
  • Next by thread: Re: get handler name
  • Index(es):
    • Date
    • Thread