Craig, The loadData command is in the behavior script, not the script of myButton.
On Tue, Jul 21, 2015 at 3:24 PM <[email protected]> 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 <[email protected]> > To: How to use LiveCode <[email protected]> > 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 > [email protected] > Please visit this url to subscribe, > unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > > > _______________________________________________ > use-livecode mailing list > [email protected] > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
