[Solved]RE: Re: How do I get the selected cells?
[Solved]RE: Re: How do I get the selected cells?
- Subject: [Solved]RE: Re: How do I get the selected cells?
- From: "Peter Karlsson" <email@hidden>
- Date: Wed, 3 Nov 2004 08:25:26 +0100
Well, it works for me and I'm happy with that. I'm pretty sure my way is
not the ultimate way. but I'm just a newbee so it takes some time to learn.
Thanks to all that helped me out with this.
Peter
Ursprungligt meddelande
>
> On Nov 2, 2004, at 3:35 PM, Graham Cox wrote:
>
> > true, but the larger question was how to record the state of each cell
> > into another structure for saving.
> >
> As part of the bigger question, the state information should almost
> certainly not be stored in the user interface...
>
>
> On Nov 2, 2004, at 2:10 AM, Peter Karlsson wrote:
> > NSArray *cells = [myMatrixOutlet cells];
> > NSEnumerator *enumerator = [cells objectEnumerator];
> > NSCell *aCell;
> > while (aCell = [enumerator nextObject])
> > {
> > if ([aCell state] == YES)
> > {
> > bits = [bits stringByAppendingString:@"1"];
> > }
> > else
> > {
> > bits = [bits stringByAppendingString:@"0"];
> > }
> > }
> >
> The more conventional approach would be for the matrix to operate
> (typically via a controller) on a model object of some description that
> captures the information. The contents of that model object should
> then be "archived" as appropriate, rather than the state of the matrix.
>
> mmalc
> _______________________________________________
> 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