aboutsummaryrefslogtreecommitdiff
path: root/GTMDefines.h
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2010-09-30 17:11:46 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2010-09-30 17:11:46 +0000
commit2a659d0787c40d0f6655cee18d56e04f2fafdc9c (patch)
treefce938350407d094a69d1294a3f17751fbf391f0 /GTMDefines.h
parent13cf693343722e3db261fa44eff1b0f8d9115e08 (diff)
[Author: dmaclach]
GTM_PROPERTY Macro defined to make working with willChangeValueForKey: and didChangeValueForKey: safer. R=thomasvl DELTA=13 (13 added, 0 deleted, 0 changed)
Diffstat (limited to 'GTMDefines.h')
-rw-r--r--GTMDefines.h13
1 files changed, 13 insertions, 0 deletions
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__