MATLAB Answers

How to retrieve handle of just-brushed object (again!)

2 views (last 30 days)
David Goldsmith
David Goldsmith on 8 Mar 2013
Seems I asked this question almost two years ago; I got one answer, but it wasn't sufficient (I didn't fully realize why at the time), 'cause it explained how to retrieve ALL brushed objects, but here's the rub: in my use case, an object may already be brushed, and I need to be able to distinguish, e.g., in the WindowButtonUpEvent handler, the FRESHLY-brushed object from the old brushed object (so that I can clear the old of its brushing). It just occurred to me that the cumbersome, "brute-force" way to do this would be to keep track of the brushed objects and, in the brush object's WindowButtonUpEvent handler, compare brushed objects w/ the existing set: the set-difference is the new one--is this really the way MathWorks expects us to do this chore? I hope not.

Answers (1)

David Goldsmith
David Goldsmith on 8 Mar 2013
Sorry for the noise, I finally found it in the online doc:
supposed to use Action Pre/Post Callbacks; brushed axis is the sole element of the event data passed to the callback.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by