Detecting SelectedObjectChanged When Clicking Another Control?

Scott Rossi scott at tactilemedia.com
Fri Sep 27 19:15:22 EDT 2013


Hi All:

I recently ran into a situation where I need to trap selectedObjectChanged
after clicking on something other than the selected control (as opposed to
clicking on the card where nothing is selected).  Can you detect this
without resorting to a front/backScript or a card/stack-level script?

I have a control that changes its state when it is selected, and I need to
revert that state when the object is deselected.  Starting with the
selected control, if I click on the card (click nothing), the control gets
the selectedObjectChanged message and can be reset.  But if I click on
another object, there doesn't seem to be a built-in way for the control to
detect this.

I've resorted to loading a backScript to tell the original control that it
has been deselected, but this seems fragile and I'm wondering if there's a
better way to handle this.

Thanks for suggestions.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design






More information about the use-livecode mailing list