Re: Run Handler-Name from Text?
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