Re: Creating Menu Items from NSMutableArray
Re: Creating Menu Items from NSMutableArray
- Subject: Re: Creating Menu Items from NSMutableArray
- From: Ryan Hale <email@hidden>
- Date: Fri, 16 Aug 2002 16:16:38 -0500
Well, the code seems to work, and I added in my outlets and arrays where
needed, but PB gives the following errors when compiling (the number on
the left corresponds to the line number in the code below):
1) "parse error before 'int'"
2) "invalid lvalue in assignment"
2) "wrong type argument to increment"
Any ideas?
1 int index;
2 for (index = 0; index < [myArray count]; index++) {
3 NSMenuItem *newItem;
4 newItem = [[NSMenuItem allocWithZone:[NSMenu menuZone]]
5 initWithTitle:[myArray objectAtIndex:index] action:NULL
6 keyEquivalent:@""];
7 [newItem setTarget:self];
8 [newItem setAction:@selector(myAction:)];
9 [myMenu addItem:newItem];
10 [newItem release];
11 }
_______________________________________________
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.