• 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
Changing NSTextField name in loop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: NSTextView Custom Class "Not Applicable"
  • Next by Date: Cocoa-Dev: How do you get custom AppleEvent commands to work!?
  • Previous by thread: Multiple AlertPanels
  • Next by thread: Cocoa-Dev: How do you get custom AppleEvent commands to work!?
  • Index(es):
    • Date
    • Thread