Re: Advice on using NSCell
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