• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How do I get the selected cells?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I get the selected cells?


  • Subject: Re: How do I get the selected cells?
  • From: mmalcolm crawford <email@hidden>
  • Date: Tue, 2 Nov 2004 15:55:14 -0800


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


References: 
 >How do I get the selected cells? (From: "Peter Karlsson" <email@hidden>)
 >Re: How do I get the selected cells? (From: Graham cox <email@hidden>)
 >Re: How do I get the selected cells? (From: mmalcolm crawford <email@hidden>)

  • Prev by Date: Re: How do I get the selected cells?
  • Next by Date: Re: Interface Creation
  • Previous by thread: Re: How do I get the selected cells?
  • Next by thread: [Solved]RE: How do I get the selected cells?
  • Index(es):
    • Date
    • Thread