• 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: Advice on using NSCell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Advice on using NSCell


  • Subject: Re: Advice on using NSCell
  • From: Ryan Britton <email@hidden>
  • Date: Sat, 4 Mar 2006 16:47:10 -0800

Just to elaborate a little more on this... You can set any cell you want on the column as long as you make sure the datasource will feed it an object it can handle. When an NSTableView is going to display a cell, it will call setObjectValue: on its instance of that cell with the object returned by the datasource for that column and that row. NSTextFieldCell can handle both NSAttributedString and NSString objects (and possibly some others as well, but definitely those two).


On Mar 4, 2006, at 4:14 PM, Andy Lee wrote:

On Mar 4, 2006, at 5:49 PM, James Bucanek wrote:
Is it OK/safe/kosher/recommended to replace the NSCell object for each of my NSTableColumns with an NSTextFieldCell object?

It should certainly be OK/safe/kosher. NSTableColumn's - setDataCell: method takes an NSCell, so any instance of a subclass of NSCell should be acceptable. Presumably that's the *purpose* of -setDataCell: -- to allow you to substitute a cell with specific behavior you want.


--Andy

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Advice on using NSCell
      • From: Greg Herlihy <email@hidden>
References: 
 >Re: Advice on using NSCell (From: James Bucanek <email@hidden>)
 >Re: Advice on using NSCell (From: Andy Lee <email@hidden>)

  • Prev by Date: Help with custom NSCell and Bindings in Table View
  • Next by Date: Re: NSXMLDocument question
  • Previous by thread: Re: Advice on using NSCell
  • Next by thread: Re: Advice on using NSCell
  • Index(es):
    • Date
    • Thread