On Jan 3, 2012, at 12:01 PM, Todd Geist wrote: > Send is different because messages not handled but the target DO NOT > continue down the message path. Send does NOT resolve "me" to the behavior > script if there is any. Like Dispatch the context is the receiving object, > not the sending one.
I am not sure this is exactly true. I have a behavior for all my database forms, so that I can code generally for all forms, while also putting form specific code in the actual card script. It is my recollection that if I send to the card, and the card does not handle the message, or passes the message, then the behavior script gets it. To test this, I scripted a handler in the stack script which popped an answer dialog. I then sent the handler to the current card, and the stack script got it. > I think dispatch does switch contexts. It send the message to the object > and it is processed along the normal message path. It does have a special > use of the "me" object which can refer to a behavior. But other than that I > am pretty sure that references are evaluated in the context of the > receiving object, not the sending one. If that is the case, then you should submit a comment in the dictionary for dispatch. I looked and there does not seem to be any mention about switching contexts or having the target object's stack become the defaultStack. Bob _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode