diff options
author | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2010-03-22 18:05:14 +0000 |
---|---|---|
committer | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2010-03-22 18:05:14 +0000 |
commit | a2e257158f491a0428926d0bf99e9200d3e0617f (patch) | |
tree | f68f6322039b389133b9e04b546abef63b7d35a8 /Foundation/GTMNSObject+KeyValueObserving.h | |
parent | 4d67e716e5a2b1b50d5eb09db4f19fd7c1ba04ae (diff) |
[Author: dmaclach]
Added some KVO debugging help. Specifically forces can access instance variables by KVO to NO
in debug mode.
R=thomasvl
DELTA=340 (269 added, 21 deleted, 50 changed)
Diffstat (limited to 'Foundation/GTMNSObject+KeyValueObserving.h')
-rw-r--r-- | Foundation/GTMNSObject+KeyValueObserving.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Foundation/GTMNSObject+KeyValueObserving.h b/Foundation/GTMNSObject+KeyValueObserving.h index de11aeb..079717f 100644 --- a/Foundation/GTMNSObject+KeyValueObserving.h +++ b/Foundation/GTMNSObject+KeyValueObserving.h @@ -32,6 +32,12 @@ #import <Foundation/Foundation.h> +#ifndef GTM_PERFORM_KVO_CHECKS +// Controls whether KVO checking code is on in debug. See +// GTMNSObject+KeyValueObserving.m for details +#define GTM_PERFORM_KVO_CHECKS 1 +#endif + // If you read the articles above you will see that doing KVO correctly // is actually pretty tricky, and that Apple's documentation may not be // completely clear as to how things should be used. Use the methods below @@ -51,6 +57,10 @@ - (void)gtm_removeObserver:(id)observer forKeyPath:(NSString *)keyPath selector:(SEL)selector; + +// Use this to have |self| stop observing all keypaths on all objects. +- (void)gtm_stopObservingAllKeyPaths; + @end // This is the class that is sent to your notification selector as an |