Before handlers
dunbarx at aol.com
dunbarx at aol.com
Sun Jan 5 23:00:29 EST 2014
The dictionary confirms this. It is a control structure, not a message:
The before handler is exclusive to behavior scripts and is sent to a behavior script before all messages.
For example, consider a mouseDown message moving through the message path. It gets to an object with a behavior script:
1. The engine looks at the behavior script of the target object - If a before mouseDown handler is present, it executes it.
2. The engine next looks at the object script - If an on mouseDown handler is present, it executes it.
3. The engine now looks at the behavior script - If an after mouseDown handler is present, it executes it.
4. The engine finally looks at the object script - If a pass mouseDown or no mouseDown handler is present, it moves on to the parent object.
A before handler allows developers to produce behavior scripts which can handle messages sent to a control without having any effect on the message path, unlike front and back scripts.
-----Original Message-----
From: Scott Rossi <scott at tactilemedia.com>
To: LiveCode Mail List <use-livecode at lists.runrev.com>
Sent: Sun, Jan 5, 2014 8:47 pm
Subject: Re: Before handlers
AFAIK, both "before" and "after" can only be used with behaviors.
Regards,
Scott Rossi
Creative Director
Tactile Media, UX/UI Design
On 1/5/14 5:36 PM, "Peter Haworth" <pete at lcsql.com> wrote:
>A while back there was a thread about not being able to send a "before
>mouseUp" message to a control. Not sure if this was discussed in that
>thread but it seems that a "before mouseUp" doesn't fire either.
>
>Seems like that should work in a front script. Anyone else have any
>experience with that, or opinions?
>
>Pete
>lcSQL Software <http://www.lcsql.com>
>_______________________________________________
>use-livecode mailing list
>use-livecode at lists.runrev.com
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list