• 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
Re: Implementing a Slightly Unusual NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Implementing a Slightly Unusual NSTableView


  • Subject: Re: Implementing a Slightly Unusual NSTableView
  • From: Corbin Dunn <email@hidden>
  • Date: Mon, 21 Apr 2008 10:08:28 -0700



I seem to recall that in 10.5 there is new API, either in NSTableView or NSActionCell, that makes this easy to do; but I just looked through both headers and can't find it. Does anyone else remember?

Yeah, I remember. The DragNDropOutlineView demo shows how.

Basically, you implement:

- (BOOL)tableView:(NSTableView *)tableView shouldTrackCell:(NSCell *)cell forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row;

And return YES, even if you don't allow the row to be selected, or if the table refuses first responder. You could refuse first responder via -acceptsFirstResponder by looking at [NSApp currentEvent] and determining if it is hit in the given cell (The demo app does something like this for refusing to change the row).

corbin
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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


References: 
 >Implementing a Slightly Unusual NSTableView (From: Peter Zegelin <email@hidden>)
 >Re: Implementing a Slightly Unusual NSTableView (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: NSTextfields and keyboard equivalents - am I missing something?
  • Next by Date: Re: Conflicting encodings issue in a Cocoa app
  • Previous by thread: Re: Implementing a Slightly Unusual NSTableView
  • Next by thread: Re: Implementing a Slightly Unusual NSTableView
  • Index(es):
    • Date
    • Thread