How To Send Before?

Monte Goulding monte at sweattechnologies.com
Tue Nov 19 20:18:32 EST 2013


On 11/11/2013, at 11:21 AM, Scott Rossi wrote:
> The problem with the above is a standard mouseDown is sent; mouseDown is
> not sent before.
> There doesn't seem to by any way to dispatch or send before.

I just tested this and the following appears to work fine:

dispatch "message" to me

This triggers before and after handlers and also gives the child script a chance to handle the actual message. Before and after are cooler than I thought... this means you can hook custom functionality onto any command that a child object uses even with lock messages on.

Just to clarify the message must go via the child in order for the parent to get a chance to handle it in a before/after script.

Cheers

--
M E R Goulding 
Software development services
Bespoke application development for vertical markets

mergExt - There's an external for that!




More information about the use-livecode mailing list