• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Can't get clicking/selecting to work correctly in custom cell in NSOutlineView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: Multiple Cocoa Applications within one
  • Next by Date: NSArrayController select inserted object
  • Previous by thread: Can an NSControl (tableview) track focus on individual cells? (was:Tabbing to NSPopUpButtonCells in a table?)
  • Next by thread: NSArrayController select inserted object
  • Index(es):
    • Date
    • Thread