Re: Advice on using NSCell
Re: Advice on using NSCell
- Subject: Re: Advice on using NSCell
- From: Greg Herlihy <email@hidden>
- Date: Sat, 04 Mar 2006 17:20:30 -0800
- Thread-topic: Advice on using NSCell
In fact the easiest way to set a table column's cell to an NSTextFieldCell
(or one of other several other types of specialized cells) is to drag the
"Text" cell from Interface Builder's Tables Palette and onto the table
column in question.
To edit the settings for this (or any, non-generic) table column cell in
Interface Builder, just click on the white triangle that appears in the
table column's header.
Greg
On 3/4/06 4:47 PM, "Ryan Britton" <email@hidden> wrote:
> 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
_______________________________________________
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