Re: Loop through NSTableView to set NSCell state
Re: Loop through NSTableView to set NSCell state
- Subject: Re: Loop through NSTableView to set NSCell state
- From: Andy Lee <email@hidden>
- Date: Sun, 14 Apr 2002 13:36:19 -0400
At 11:23 AM -0400 4/14/02, Erik J. Barzeski wrote:
On 4/14/02 10:50am, j o a r <email@hidden> wrote:
> Complying with the MVC pattern you should never need to enumerate over
the cells in the table view - the view is just there do display values,
not provide them.
I disagree, and have found times to use -selectedRowEnumerator many times,
if only to figure out _what_ object in the "model" is selected based on the
selected row's index.
You may have missed the original question, which was how to enumerate
over all the cells in the table view -- *all* the cells, not just the
selected ones, and all the *cells*, not their row numbers (under the
mistaken assumption that NSTableView uses one NSCell per displayed
cell, the way NSMatrix does).
Onar specifically did not want to select the whole table just to be
able to use -selectedRowEnumerator -- which wouldn't have helped
anyway, because -selectedRowEnumerator returns row numbers, not
instances of NSCell.
--Andy
_______________________________________________
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.