[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

selected objects

Joe Van Dyk

3/17/2005 9:29:00 PM

I have a bunch of shapes in a GnomeCanvas object.

When a user clicks on a Shape, I'd like to select/highlight it and
deselect/unhighlight all other shapes.

So, in my Shape class, I'm catching the click signal and highlighting
the object. I'm not sure how to go about deselecting all the other
Shapes though. Would it make sense to have a class variable in Shapes
that had an array of each Shape and, on a click event, loop through
each Shape and deselect it?

Thanks,
Joe