What I’d like to do is something like this:
NSArray *someArray = [[NSArray alloc] initWithObjects: C_MACRO, nil];
With the C_MACRO part being an outlying file that uses a #define to list some number of NSStrings, so when I need to change the string objects that populate the array I can conveniently do in one file. So far, it seems this is impossible. But then again, I’m a novice.
Anyone care to enlighten me?
No problem doing this… A macro is just text-replacement.
Note you can use macros inside another macro. So
Another way is to have your strings allocated in a .m file, and declared as
externin a public header file. Handy if unique instances of the same object has to be shared.