• 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: NSTableView -editColumn:row:withEvent:select: question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView -editColumn:row:withEvent:select: question


  • Subject: Re: NSTableView -editColumn:row:withEvent:select: question
  • From: Corbin Dunn <email@hidden>
  • Date: Tue, 22 Apr 2008 08:50:28 -0700


On Apr 21, 2008, at 10:43 AM, John Stiles wrote:
Corbin Dunn wrote:

On Apr 18, 2008, at 3:37 PM, John Stiles wrote:

Ben Lachman wrote:
> Well, you should be able to just override the drawing code, since > thats really your problem. Going directly against the docs, while it > may work fine now, is playing with fire in my opinion.
Yeah… that's why I posted :) I was hoping to get a "oh yeah, that only applies if [...], file a radar on the docs" or something.


I decided that, no matter what, the docs are definitely not right, because they claim that an exception will be thrown even though that clearly does not happen. So I filed a radar; we'll see if anything comes back.

rdar://5875017 [Docs] -editColumn:row:withEvent:select: needs clarification

The docs are wrong. The row doesn't have to be selected before you call editColumn:. The row has to be selected before NSTableView will call editColumn:. If you are calling it yourself at the appropriate time, then that is a-okay.


In effect, another way to get what you want is to override selection drawing and to not draw selection. So, tableview still has a selected row, but it just doesn't show up selected.

Excellent. Thanks for the clarification, it's much appreciated!!

(How do you override selection drawing? Reimplement - highlightSelectionInClipRect:? Not that I think I need to, I'm just curious.)

That, and subclass the cell, and return nil from:

- (NSColor *)highlightColorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView;

..I know, it is sort of strange, and I am working on making that easier.

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: 
 >Re: NSTableView -editColumn:row:withEvent:select: question (From: John Stiles <email@hidden>)
 >Re: NSTableView -editColumn:row:withEvent:select: question (From: Corbin Dunn <email@hidden>)
 >Re: NSTableView -editColumn:row:withEvent:select: question (From: John Stiles <email@hidden>)

  • Prev by Date: NSButton "reveals" keyboard shortuct
  • Next by Date: Re: Consistent Contextual Menu in NSTableview
  • Previous by thread: Re: NSTableView -editColumn:row:withEvent:select: question
  • Next by thread: Pasteboard inconsistencies
  • Index(es):
    • Date
    • Thread