One Quickie


Convert a preprocessor symbol to an NSString (General->General)
#define CONVERT_SYMBOL_TO_NSSTRING_2(x) @#x
#define CONVERT_SYMBOL_TO_NSSTRING(x) CONVERT_SYMBOL_TO_NSSTRING_2(x)

NSString *version = CONVERT_SYMBOL_TO_NSSTRING (BUILD_NUMBER);
(Thanks to TVL for helping me figure this one out)



borkware home | products | miniblog | rants | quickies | cocoaheads
Advanced Mac OS X Programming book

webmonster@borkware.com