• 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: How do I create a NSArray of NSString constants?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I create a NSArray of NSString constants?


  • Subject: Re: How do I create a NSArray of NSString constants?
  • From: Andreas Mayer <email@hidden>
  • Date: Mon, 27 Jun 2005 18:57:20 +0200


Am 27.06.2005 um 18:31 Uhr schrieb Scott Mitchell:

But what I really need to do is to create an NSArray of these strings.

Um... why?

I'd create an accessor method of some sorts; like

- (NSString *)localizedStringForSubmitPeriod:(int)period
{
NSString *key = [NSString stringWithFormat:@"GB_Submit_Period%i", period];
NSString *result = NSLocalizedString(key, @"");
return result;
}



Can I not create a constant NSArray like this?

No, you can't.


Andreas _______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >How do I create a NSArray of NSString constants? (From: Scott Mitchell <email@hidden>)

  • Prev by Date: Re: How do I create a NSArray of NSString constants?
  • Next by Date: Re: Getting NSMetadataQuery to sort properly
  • Previous by thread: Re: How do I create a NSArray of NSString constants?
  • Next by thread: Re: How do I create a NSArray of NSString constants?
  • Index(es):
    • Date
    • Thread