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

Re: handler failure


  • Subject: Re: handler failure
  • From: has <email@hidden>
  • Date: Wed, 13 Nov 2002 13:35:46 +0000

Chris Espinosa wrote:

>A handler is essentially a property in your script, and you can set it
>to any value, including that of another function.

Unfortunately, this [undocumented] behaviour has always been broken:

======================================================================

script a
property _val : 1

on foo()
return _val
end foo
end script

script b
property bar : missing value
end script

a's foo()
--> 1

set b's bar to a's foo
b's bar
--> <<handler foo>> --!!!!!

======================================================================

When the handler object moves to a new context, it forgets its original
context (bad) and attempts to use the new one instead (worse). Mix in some
static bindings for laffs, and you can get some fantastically
incomprehensible results (...).

Still Chris... now that you've opened Pandora's Box for all to see, any
chance this amnesia problem might be fixed in a future release?

has

--
http://www.barple.pwp.blueyonder.co.uk -- The Little Page of AppleScripts
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: handler failure
      • From: Axel Luttgens <email@hidden>
    • Re: handler failure
      • From: email@hidden (Michael Sullivan)
    • Re: handler failure
      • From: Paul Skinner <email@hidden>
  • Prev by Date: Re: Cleaning up Eudora...
  • Next by Date: A Primer for Applescript...?
  • Previous by thread: Re: handler failure
  • Next by thread: Re: handler failure
  • Index(es):
    • Date
    • Thread