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 <p...@lcsql.com>
To: How to use LiveCode <use-livecode@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to