Re: NSArrayController and
Re: NSArrayController and
- Subject: Re: NSArrayController and
- From: Allan Odgaard <email@hidden>
- Date: Mon, 8 Mar 2004 15:29:09 +0100
On 8. Mar 2004, at 10:46, Erik Stein wrote:
My model only has a title and content. No problems with these. Now I
like to have a column in the table view that displays the index of the
model object inside the content array (for that reordering of items
makes sense and is visible in the user interface).
So if I understand you correctly, you have an array of e.g.
dictionaries which you hand over to an array controller and have it
display it in a table view.
You would like the table view to show one extra column, for which there
is no corresponding key in the dictionaries (i.e. the index).
And you are wondering where you should place the code to generate the
values for this extra column?
One solution is to drop this "dynamic generation" of the column and
simply store the value in the array items (dictionaries). Another is to
use custom classes instead of dictionaries (but which wrap for a
dictionary) which can generate the value when requested.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.