Changing NSTextField name in loop
Changing NSTextField name in loop
- Subject: Changing NSTextField name in loop
- From: Mike Brinkman <email@hidden>
- Date: Mon, 15 Apr 2002 16:00:17 -0400
I've got a form with NSTextFields, and I'd like to store their NSNumber
values in an NSArray. The NSTextFields are named sequentially, so I figure
the easiest way to do it would be something like this:
for(i = 0; i < 20; i++)
{
number = [[NSNumber alloc] initWithInt:[myField"i" intValue]];
[myArray addObject:number];
}
I'm not quite sure how I would have the "myField'i'" name change through the
loop such as "myField1, myField2, etc.". I've looked under NSTextField and
NSControl, but didn't recognize anything that would let me do this. Any help
would be greatly appreciated!
_______________________________________________
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.