Re: Dynamic Handler Call
Re: Dynamic Handler Call
- Subject: Re: Dynamic Handler Call
- From: Gary Beberman <email@hidden>
- Date: Sun, 9 Apr 2006 13:03:02 -0700
That's great. Thanks for the suggestion. Not that I want to push my
luck, but is there some way I could pass parameters into the script,
also?
Thanks,
Gary
At 5:15 PM +0100 4/8/06, has wrote:
Gary Beberman wrote:
I would like to create a list of records in which each record has a
text string and a handler name associated with the string. [...] A
user selects the text from a list, the script finds the associated
hname and calls the handler.
script obj1
on foo()
say "hello one"
end foo
end script
script obj2
on foo()
say "hello two"
end foo
end script
set hlist to {{searchtext:"text string 1", obj:obj1},
{searchtext:"text string 2", obj:obj2}}
set s to "text string 2"
repeat with rec in hlist
if searchtext of rec is s then foo() of obj of rec
end repeat
HTH
has
--
http://freespace.virgin.net/hamish.sanderson/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden