• 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: access multiple NSTextFields as an array?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: access multiple NSTextFields as an array?


  • Subject: Re: access multiple NSTextFields as an array?
  • From: Artemiy Pavlov <email@hidden>
  • Date: Mon, 20 Dec 2010 18:01:25 +0200

Just create a NSMutableArray before the loop:

NSMutableArray *array = [NSMutableArray arrayWithCapacity:16];

And then add each field to the array right in the loop

for (…) {
   …
  [array addObject:textField];
}

Great, thanks a lot! Can I then access each element via array[0], array[1] etc.? I.e. will [array[0] setColor:...] work?



Thanks again,

Artemiy._______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: access multiple NSTextFields as an array?
      • From: Siegfried <email@hidden>
References: 
 >access multiple NSTextFields as an array? (From: Artemiy Pavlov <email@hidden>)
 >Re: access multiple NSTextFields as an array? (From: Siegfried <email@hidden>)

  • Prev by Date: Re: UIBezierPath: trying to create an array with CGPointMake
  • Next by Date: Re: Modal loop memory leak on 10.6
  • Previous by thread: Re: access multiple NSTextFields as an array?
  • Next by thread: Re: access multiple NSTextFields as an array?
  • Index(es):
    • Date
    • Thread