Can't get clicking/selecting to work correctly in custom cell in NSOutlineView
Can't get clicking/selecting to work correctly in custom cell in NSOutlineView
- Subject: Can't get clicking/selecting to work correctly in custom cell in NSOutlineView
- From: Dave Camp <email@hidden>
- Date: Thu, 3 May 2007 15:39:05 -0600
I've got an NSOutlineView and I've made a subclass of NSCell to use
in one of the columns. The cell works as expected except for click
handling. The desired behavior is that if the user clicks in a
specific rectangle in the cell, I want the value to change (e.g. a
checkbox). If the user clicks anywhere else in the cell, I just want
the row to highlight.
The problem is that NSOutlineView calls my setObejctValue with a new
value no matter where I click in the cell. I've tried overriding both
the trackMouse:inRect:ofView:untilMouseUp: and startTrackingAt/
continueTracking/stopTracking methods to no avail. No matter what I
return I still get called to change my value no matter where the
click was.
What am I missing? I've reviewed the NSCell and NSTableView docs and
I don't see anything that would help me limit the target area other
than the mouse tracking methods.
Thanks,
Dave
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden