Re: handler failure
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.