Re: Help with custom NSCell and Bindings in Table View
Re: Help with custom NSCell and Bindings in Table View
- Subject: Re: Help with custom NSCell and Bindings in Table View
- From: Greg Herlihy <email@hidden>
- Date: Sun, 05 Mar 2006 01:41:07 -0800
- Thread-topic: Help with custom NSCell and Bindings in Table View
An NSTableColumn happens to use the same cell to draw all of its rows, but
there is no inherent reason why it must do so.
And in fact a subclass of NSTableColumn would be free to implement
dataCellForRow: how ever it liked: it could well decide to return one of
several different types of cells, say, based upon the type of data
represented in the row being rendered. Or the table column class could go
further and return a unique cell for each row, although the overhead of
doing so could become an issue for large tables.
Now granted, most programs don't need to subclass NSTableColumn. But if the
program does have special table requirements that require having more than
one cell to display all the rows in a column, then implementing a subclass
of NSTableColumn would be one solution.
Greg
On 3/4/06 9:22 PM, "John C. Randolph" <email@hidden> wrote:
>
> On Mar 4, 2006, at 4:43 PM, Mike Abdullah wrote:
>
>> How do I get NSArrayController to properly set up and manage a
>> seperate instance of MyCustomCell for each row of the table?
>
> You don't.
>
> TableViews only use one cell per column.
>
> -jcr
>
> _______________________________________________
> 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