Parent of Target

Trevor DeVore lists at
Wed Aug 23 09:21:28 EDT 2017

On Wed, Aug 23, 2017 at 1:33 AM J. Landman Gay via use-livecode <
use-livecode at> wrote:

> On 8/22/17 11:42 PM, Trevor DeVore via use-livecode wrote:
> > Why do you need to turn
> > the long id of the parent into a small array and dispatch to to any
> object
> > along the path? From the search custom control I would just do the
> > following:
> >
> > dispatch "behaviorSearchAndFilter"
> >
> > This sends the message down the normal message path starting at the
> object
> > containing the script.
> Would you even need "dispatch"? Why not just "behaviorSearchAndFilter"?

I'm in the habit of using "dispatch" as it mimics how the engine works and
won't throw an error if a message isn't handled.

In this case you could argue that you want an error to occur if you haven't
implemented the handler. When I'm testing a component I don't want to deal
with the debugger opening up though.

Trevor DeVore


More information about the Use-livecode mailing list