Re: Coerce String to Handler?
Re: Coerce String to Handler?
- Subject: Re: Coerce String to Handler?
- From: "Neal A. Crocker" <email@hidden>
- Date: Sat, 14 Apr 2001 23:43:00 -0500
Try the following:
on makereference(propname, target)
script refscript
--{class:reference,+class form;:+constant ****usrp;, +class
want;:+class prop;, +class seld;:propname, +class from;:target}
{class:reference, +class form;:+constant ****usrp;, +class
want;:property, +class seld;:propname, from:target} -- this line
won't compile. replace with line above to compile
end script
run script refscript
end makereference
set blah to makereference("bar", {bar:2})
{blah, blah + 1} -- {bar of {bar:2}, 3}
Subject: Coerce String to Handler?
To: <email@hidden>
From: Ehsan Saffari <email@hidden>
Date: Fri, 13 Apr 2001 08:53:54 -0600
Hi
Is it possible to coerce a string to a handler name
so the handler can be executed?
set x to "iac"
my handler x()
--> Can't make "iac" into a handler.
on iac()
beep
end iac
cheers
ehsan