Re: Coerce String to Handler Name?
Re: Coerce String to Handler Name?
- Subject: Re: Coerce String to Handler Name?
- From: Deivy Petrescu <email@hidden>
- Date: Sun, 15 Apr 2001 17:39:32 -0400
This works:
_______________________
on iac(j)
beep j
delay (j - 1)
beep (j - 2)
end iac
set x to iac(5)
try
run script (x)
end try
__________
with no error trapping the handler gets executed but there is an
error message "x is not defined" afterwards.
Same thing for
_______________
on iac(j)
beep j
delay (j - 1)
beep (j - 2)
end iac
set x to iac
try
run script (x(5))
end try
_______
There is an error trapped by the try statement.
This:
_________________
on iac()
beep 5
delay 4
beep 3
end iac
set x to iac
run script (x)
_________________
however, runs flawlessly. -----------> OS9.1AS1.6
by the way "iac" is text iac is a variable. So set x to "iac" x is a
variable that has a text value, should it ever work?
Regards
Deivy Petrescu
http://www.dicas.com
Tips for your Mac.
Dicas para o seu Mac.
mailto:email@hidden
mailto:email@hidden