• 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: NSButtonCell in NSTableView.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSButtonCell in NSTableView.


  • Subject: Re: NSButtonCell in NSTableView.
  • From: "I. Savant" <email@hidden>
  • Date: Wed, 6 Jun 2007 07:53:17 -0400

On Jun 6, 2007, at 7:39 AM, Jerry Krinock wrote:
If you mean that you want buttons in different rows to look different, the answer is to subclass NSTableColumn and over-ride - dataCellForRow to switch or if/else as a function of row. Or, use -[NSTableView itemAtRow:] to switch as a function of item type.

... or NSTableView's - tableView:willDisplayCell:forTableColumn:row: delegate and <NSTableDataSource> -tableView:objectValueForTableColumn:row: data source methods.


I think the above suggestion is very likely overkill for what the OP is trying to do. Why not just let the app's controller layer tell the view(s) what to do?

http://developer.apple.com/documentation/Cocoa/Conceptual/TableView/ index.html

--
I.S.



_______________________________________________

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


References: 
 >NSButtonCell in NSTableView. (From: Sachin Kumar Tulla <email@hidden>)
 >Re: NSButtonCell in NSTableView. (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: Recursion taking up far too much memory... any ideas?
  • Next by Date: Re: How is a bound NSArrayController so stealthy?
  • Previous by thread: Re: NSButtonCell in NSTableView.
  • Next by thread: NSScrollView intial state
  • Index(es):
    • Date
    • Thread