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: "Erik J. Barzeski" <email@hidden>
- Date: Sun, 14 Apr 2002 16:23:40 -0400
Hi,
On 4/14/02 4:16pm, Andy Lee <email@hidden> wrote:
>
From: Andy Lee <email@hidden>
>
Date: Sun, 14 Apr 2002 13:36:19 -0400
>
To: <email@hidden>
>
Subject: Re: Loop through NSTableView to set NSCell state
>
>
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.
I think "duh" says it. I didn't miss the original question - but I also
didn't reply to _it_ either.
--
Best wishes,
Erik J. Barzeski
Rules? We don't have rules. We're trying to accomplish something!
*******************************************************************
Email: erik@(anything below)
AIM: iacas ICQ: 8186546
http://barzeski.com/ http://weims.net/
http://techstra.net/ http://cocoadevcentral.com/
http://soundsetcentral.com/ http://applescriptcentral.com/
*******************************************************************
_______________________________________________
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.