• 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: Fritz Anderson <email@hidden>
  • Date: Mon, 20 Dec 2010 10:27:01 -0600

On 20 Dec 2010, at 10:16 AM, Artemiy Pavlov wrote:

> int x;
> NSMutableArray *Array;
>
> for(x=1;x<=9;x++){
>    NSTextField *PatternRateLabel = etc. etc.
>    [Array addObject:PatternRateLabel];
> }
>
> [[Array objectAtIndex:0] setColor:...]
>
> However, if I have this last line, my view freezes... Maybe I do not create the array properly?

You have to allocate and initialize your array. This is an elementary-level problem, and you will have worse and worse problems unless have a good grasp of the collection classes in Foundation. Apple's documentation has a "Collections Programming Topics" article to get you started.

	— F

_______________________________________________

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

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

  • Prev by Date: Re: access multiple NSTextFields as an array?
  • Next by Date: Re: access multiple NSTextFields as an array?
  • Previous by thread: Re: access multiple NSTextFields as an array?
  • Next by thread: Re: access multiple NSTextFields as an array?
  • Index(es):
    • Date
    • Thread