Re: Coerce String to Handler?
Re: Coerce String to Handler?
- Subject: Re: Coerce String to Handler?
- From: Emmanuel <email@hidden>
- Date: Sun, 15 Apr 2001 01:20:15 +0200
At 6:06 +0200 14/04/01, Timothy Bates wrote:
>
If anyone at apple was keen, calling by name is a fantastic capability for a
>
language, and is really essential for handling html forms which can have
>
variable variables, if you get what I mean.
>
>
a suitably verbose syntax could be
>
>
>
my x as named variable
>
>
or
>
>
contents of x as variable
>
>
set x to "iac"
>
>
on iac()
>
beep
>
end iac
Not sure I understand. 'run script' does something like calling by name.
The matter here is more a matter of availability of the handler (the
question of the context). In applets (or, in the text windows of Smile),
which have permanent contexts, you can run:
----------------
on iac()
beep
end iac
run script("iac()")
----------------
Script Editor's windows may not run properly this script.
HTH
Emmanuel