• 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
Best way to Define Project Wide Static Strings?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Best way to Define Project Wide Static Strings?


  • Subject: Best way to Define Project Wide Static Strings?
  • From: Dave <email@hidden>
  • Date: Thu, 8 Apr 2010 12:23:54 +0100

Hi All,

I have a number of Constant Strings that are project wide. I started off defining them at the top of a .m file but as the project has grown over the weeks I've pasted them into each new .m file as and when they are needed. I'm now tidying up my code and was wondering the best way in which to make them project wide and how to reference them.

Here is an example way I have them defined at present:

static NSString	kString1 = @"some string";
static NSString	kString2 = @"some other string";

What is a good way to handle this? Is there a preferred method?

Thanks a lot
All the Best
Dave



_______________________________________________

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: Best way to Define Project Wide Static Strings?
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: NSPrintInfo, setting filename for print to PDF?
  • Next by Date: The right place for an importer in the document architecture
  • Previous by thread: Re: CSS style string to NSAttributedString attributes conversion
  • Next by thread: Re: Best way to Define Project Wide Static Strings?
  • Index(es):
    • Date
    • Thread