• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Coerce String to Handler Name?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: Trapping aete's
  • Next by Date: Re: Coerce String to Handler?
  • Previous by thread: Re: Coerce String to Handler Name?
  • Next by thread: Re: Coerce String to Handler Name?
  • Index(es):
    • Date
    • Thread