• 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: Run Handler-Name from Text?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Run Handler-Name from Text?


  • Subject: Re: Run Handler-Name from Text?
  • From: Nigel Garvey <email@hidden>
  • Date: Wed, 18 Apr 2012 20:34:19 +0100

Tetsuro Kurita wrote on Thu, 19 Apr 2012 01:09:47 +0900:

>>  on myHandlerName()
>>    display dialog "Yes!"
>>  end myHandlerName
>>
>>  run script "on run {fred}
>>  tell fred to myHandlerName()
>>  end" with parameters {me}

>Following code will be better.
>
>on myHandlerName()
>	display dialog "Yes!"
>end myHandlerName
>
>set broker to run script "script
>on do(target)
>target's myHandlerName()
>end do
>end script
>return result"
>
>broker's do(me)
>
>Above code can avoid to copy the script object indicated by "me".

Yes. That's certainly faster. Thanks!

I presume that by "copy" you're saying that my version compiles a copy
of the main script into the one created by "run script"?

NG


 _______________________________________________
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: Run Handler-Name from Text?
      • From: Tetsuro Kurita <email@hidden>
  • Prev by Date: RE: maths
  • Next by Date: Re: maths
  • Previous by thread: Re: Run Handler-Name from Text?
  • Next by thread: Re: Run Handler-Name from Text?
  • Index(es):
    • Date
    • Thread