Behavior question

Peter Haworth pete at lcsql.com
Wed Jul 22 00:42:43 CEST 2015


Craig,
The loadData command is in the behavior script, not the script of myButton.

On Tue, Jul 21, 2015 at 3:24 PM <dunbarx at aol.com> wrote:

> I am not sure I understand.
>
>
> If "myButton" has a handler in its script called "loadData", then the
> dispatch command should work regardless of any behaviors. This is direct,
> message-bypassing, er, behavior.
>
>
> If the behavior of  that other control, was set to the long id of
> "myButton", then simply invoking "loadData" from that control would cause
> the handler in "myButton" to fire.
>
>
> Is this what you are seeing? Or not seeing?
>
>
> Craig Newman
>
>
>
> -----Original Message-----
> From: Peter Haworth <pete at lcsql.com>
> To: How to use LiveCode <use-livecode at lists.runrev.com>
> Sent: Tue, Jul 21, 2015 5:05 pm
> Subject: Behavior question
>
>
> I have a button named "myButton" with a behavior "myBehavior" whose
> script
> includes a handler named "loadData".
>
> From anther control I
> execute:
>
> dispatch "loadData" to button "myButton"
>
> The loadData handler is
> not executed and the it variable contains
> "unhandled" after the dispatch
> command.
>
> That should work, shouldn't
> it?
> _______________________________________________
> 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