PDA

View Full Version : Clickable NSIMageView in view-based table view




Starfox
Mar 6, 2012, 07:30 PM
I'm trying to make a clickable or double-clickable NSImageView in a view-based table view. I subclassed NSImageView and overrode mouseUp:, but it's not even getting called. I checked that the image view class in IB is set to MyImageView, it's enabled, doesn't refuse first responder and is editable. What am I missing?



kainjow
Mar 7, 2012, 10:38 AM
You probably have to override mouseDown: and handle the event tracking yourself if you want it to behave like a normal button.

Starfox
Mar 7, 2012, 11:14 AM
Nope, it works just fine when the image view isn't in a view-based table view.

robbieduncan
Mar 7, 2012, 11:25 AM
Is the table getting the message and consuming it before your view gets a chance?

Starfox
Mar 8, 2012, 11:50 AM
How can I know if that's the case?