• 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: return NO in tableViewSelectionDidChange: disables button cell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: return NO in tableViewSelectionDidChange: disables button cell


  • Subject: Re: return NO in tableViewSelectionDidChange: disables button cell
  • From: Michael Hanna <email@hidden>
  • Date: Sun, 09 Oct 2011 12:21:33 -0400

Was exactly what I needed! Thanks,

Michael

On Sat, Oct 8, 2011 at 11:20 PM, Quincey Morris <
email@hidden> wrote:

> On Oct 8, 2011, at 20:10 , Michael Hanna wrote:
>
> On Mac OS X 10.6.8, in an NSTableView I have a column that contains
> nsbuttoncell class. Row selection isn't useful in my application but doing:
>
> - (BOOL)tableView:(NSTableView *)tableView shouldSelectRow:(NSInteger)row
> {
>  return NO;
> }
>
> means that there is no response whenever I click on the button cell(it
> doesn't fire).
>
> How do I get that button cell to send it's action and have no row selection
> in the table view at the same time? I'm sure there is a way to do this.
>
>
> See the 'tableView:shouldTrackCell:forTableColumn:row:' delegate method.
>
> The reference documentation for this method includes this discussion:
>
> "Normally, only selectable or selected cells can be tracked. If you
> implement this method, cells which are not selectable or selected can be
> tracked, and vice-versa.
>
> "For example, this allows you to have an NSButtonCell in a table which does
> not change the selection, but can still be clicked on and tracked."
>
>
> Does that sound relevant to your situation?
>
>
>
_______________________________________________

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: 
 >return NO in tableViewSelectionDidChange: disables button cell (From: Michael Hanna <email@hidden>)
 >Re: return NO in tableViewSelectionDidChange: disables button cell (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: dataWithBytesNoCopy:length:freeWhenDone
  • Next by Date: NSTableView data source issue - code moving from xcode 3 to xcode 4
  • Previous by thread: Re: return NO in tableViewSelectionDidChange: disables button cell
  • Next by thread: -dateWithTimeIntervalSinceNow: 64-bits may overflow
  • Index(es):
    • Date
    • Thread