• 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?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Coerce String to Handler?


  • Subject: Re: Coerce String to Handler?
  • From: Brennan Young <email@hidden>
  • Date: Mon, 16 Apr 2001 10:10:18 +0200
  • Organization: Magic Lantern

Jeffrey W Baumann <email@hidden> wrote

> I think what we need is something analagous to Javascript's "eval"
> function.

That would be nice, and considering Applescript's LISP roots, it's
surprising we don't have this yet.

Lingo has a neat feature where you can use a 'symbol' datatype for a
handler name, so that the call

obj.handler()

...can be written as

call #handler, obj

...and thus...

if a then
h = #handlerA
else
h = #handlerB
end if

call h, obj

I've often found myself missing this in Applescript.

--
_____________

Brennan


  • Follow-Ups:
    • Re: Coerce String to Handler?
      • From: Chris Nebel <email@hidden>
  • Prev by Date: Re: CGIs with MacOS 9.1 - problem
  • Next by Date: Re: Trapping aete's
  • Previous by thread: Re: Coerce String to Handler?
  • Next by thread: Re: Coerce String to Handler?
  • Index(es):
    • Date
    • Thread