• 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
Getting selected items in a matrix
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting selected items in a matrix


  • Subject: Getting selected items in a matrix
  • From: Peter Schols <email@hidden>
  • Date: Sat, 23 Feb 2002 17:46:04 +0100

Hi,

My app has a matrix containing 7 buttons. When the user clicks a button, I need to know which buttons are ON. I tried the following code, but my app crashes when executing this method.

What am I doing wrong here?

Thanks!
Peter

- (NSString *)setDay:(id)sender
{
int i;
NSArray *array = [[NSArray alloc] init];
array = [dayButton selectedCells];
while (i < [array count]) {
if ([[array objectAtIndex:i] state] == NSOnState) {
// code to add the Tag of the selected item to another array goes here }
}
}
_______________________________________________
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.
  • Follow-Ups:
    • Re: Getting selected items in a matrix
      • From: John Hörnkvist <email@hidden>
    • Re: Getting selected items in a matrix
      • From: Nicholas Shanks <email@hidden>
  • Prev by Date: Changing the default color in an NSTextView?
  • Next by Date: Re: Getting selected items in a matrix
  • Previous by thread: Re: Changing the default color in an NSTextView?
  • Next by thread: Re: Getting selected items in a matrix
  • Index(es):
    • Date
    • Thread