Re: Proper place to define static strings
Re: Proper place to define static strings
- Subject: Re: Proper place to define static strings
- From: Adam Thayer <email@hidden>
- Date: Thu, 29 Aug 2002 23:15:47 -0700
On 2002-08-29 20:31:58 -0400 Philip Streck <email@hidden> wrote:
When writing an Objective C class and you need to define a static string what is the proper place and method of doing so? I assume using #define in my source file is taboo here :-)
Depends on the string... if it needs to be localized (any string that will be read by users) should be stored in a string plist file as part of your project localization. You can then retrieve that string when you create an NSString object.
If you are just doing things like defining keys to use in an NSDictionary, then you could go ahead and either use #define <Something> @"String or @"String" in the code itself to set things up. It is really up to you, but if you are going to release this, keep in mind you need to allow UI strings to get localized.
_______________________________________________
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.