From 2a659d0787c40d0f6655cee18d56e04f2fafdc9c Mon Sep 17 00:00:00 2001 From: "gtm.daemon" Date: Thu, 30 Sep 2010 17:11:46 +0000 Subject: [Author: dmaclach] GTM_PROPERTY Macro defined to make working with willChangeValueForKey: and didChangeValueForKey: safer. R=thomasvl DELTA=13 (13 added, 0 deleted, 0 changed) --- GTMDefines.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'GTMDefines.h') diff --git a/GTMDefines.h b/GTMDefines.h index c033d6f..a6612e6 100644 --- a/GTMDefines.h +++ b/GTMDefines.h @@ -372,4 +372,17 @@ GTM_EXTERN void _GTMUnitTestDevLog(NSString *format, ...); @end #endif // !defined(GTM_10_6_PROTOCOLS_DEFINED) && !(MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6) +// GTM_SEL_STRING is for specifying selector (usually property) names to KVC +// or KVO methods. +// In debug it will generate warnings for undeclared selectors if +// -Wunknown-selector is turned on. +// In release it will have no runtime overhead. +#ifndef GTM_SEL_STRING + #ifdef DEBUG + #define GTM_SEL_STRING(selName) NSStringFromSelector(@selector(selName)) + #else + #define GTM_SEL_STRING(selName) @#selName + #endif // DEBUG +#endif // GTM_PROPERTY + #endif // __OBJC__ -- cgit v1.2.3