Re: Run Handler-Name from Text?
Re: Run Handler-Name from Text?
- Subject: Re: Run Handler-Name from Text?
- From: Shane Stanley <email@hidden>
- Date: Fri, 20 Apr 2012 15:13:51 +1000
On 19/04/2012, at 5:55 PM, Christopher Stone wrote:
More grist for the mill.
And yet more:
on handler_f() return "f!" end handler_f
on handler_g() return "g!" end handler_g
on handler_h() return "h!" end handler_h
set lookup to {{handler_f:handler_f}, {handler_g:handler_g}, {handler_h:handler_h}}
set theHandler to handler_for("handler_f") theHandler()
on handler_for(x) tell application "ASObjC Runner" set y to value for key path x of item my lookup return item 1 of (modify list y with removing blanks) end tell end handler_for
|
_______________________________________________
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