Using the GetDataOfLine function out of the message path?
bobs at twft.com
Thu Dec 8 10:51:31 CST 2011
On Dec 8, 2011, at 8:30 AM, stephen barncard wrote:
> Not to be a problem, but 'call' is NOT a synonym of 'send'
> from the docs:
> The *call* command sends a handler message to the object. If the script of
> the object doesn't trap the handler message, the message is passed to the
> next object in the object's message path.
> When executing a handler invoked by the *call *command the defaultStack
> remains the same as it was when the *call *command was issued. Therefore
> any object references in the called handler are evaluated in the context of
> the call command that invoked the handler. For example, button 3 may
> commonly refer to button 3 of the current card of the stack from which the
> target handler was called.
> *This differs from the send command which temporarily changes the context
> so that object references are evaluated in the context of the object
> containing the target handler.*
Ooooh good info. That goes into the keepers pile. I was under the impression that context was ALWAYS from the perspective of the object the running script, but with call you can circumvent that.
More information about the use-livecode