mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Add exceptions to KVO methods for now
This commit is contained in:
parent
3278eaa2ca
commit
9f4a5c80ed
2 changed files with 40 additions and 15 deletions
|
@ -127,13 +127,6 @@ extern "C" {
|
|||
- (void) setValue: (GS_GENERIC_TYPE(ElementT))value forKey: (NSString*)key;
|
||||
- (GS_GENERIC_TYPE(ElementT)) valueForKey: (NSString*)key;
|
||||
|
||||
// Key-Value Observing Support
|
||||
/*
|
||||
- addObserver:forKeyPath:options:context:
|
||||
- removeObserver:forKeyPath:
|
||||
- removeObserver:forKeyPath:context:
|
||||
*/
|
||||
|
||||
// Comparing Sets
|
||||
- (BOOL) isEqualToOrderedSet: (NSOrderedSet *)aSet;
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#import "Foundation/NSException.h"
|
||||
#import "Foundation/NSPredicate.h"
|
||||
#import "Foundation/NSLock.h"
|
||||
#import "Foundation/NSKeyValueObserving.h"
|
||||
|
||||
#import <GNUstepBase/GSBlocks.h>
|
||||
#import "Foundation/NSKeyedArchiver.h"
|
||||
|
@ -1023,7 +1024,45 @@ static SEL rlSel;
|
|||
for (i = aRange.location; i < e; i++)
|
||||
aBuffer[j++] = (*get)(self, oaiSel, i);
|
||||
}
|
||||
|
||||
|
||||
// Key-Value Observing Support
|
||||
|
||||
- (void)addObserver: (NSObject *)observer
|
||||
forKeyPath: (NSString *)keyPath
|
||||
options: (NSKeyValueObservingOptions)options
|
||||
context: (void *)context
|
||||
{
|
||||
NSException *exception = nil;
|
||||
NSString *reason = @"NSOrderedSet does not support KVO";
|
||||
exception = [NSException exceptionWithName: NSGenericException
|
||||
reason: reason
|
||||
userInfo: nil];
|
||||
[exception raise];
|
||||
}
|
||||
|
||||
- (void)removeObserver: (NSObject *)observer
|
||||
forKeyPath: (NSString *)keyPath
|
||||
{
|
||||
NSException *exception = nil;
|
||||
NSString *reason = @"NSOrderedSet does not support KVO";
|
||||
exception = [NSException exceptionWithName: NSGenericException
|
||||
reason: reason
|
||||
userInfo: nil];
|
||||
[exception raise];
|
||||
}
|
||||
|
||||
- (void) removeObserver: (NSObject *)observer
|
||||
forKeyPath: (NSString *)keyPath
|
||||
context: (void *)context
|
||||
{
|
||||
NSException *exception = nil;
|
||||
NSString *reason = @"NSOrderedSet does not support KVO";
|
||||
exception = [NSException exceptionWithName: NSGenericException
|
||||
reason: reason
|
||||
userInfo: nil];
|
||||
[exception raise];
|
||||
}
|
||||
|
||||
// Key value coding support
|
||||
- (void) setValue: (id)value forKey: (NSString*)key
|
||||
{
|
||||
|
@ -1057,13 +1096,6 @@ static SEL rlSel;
|
|||
return results;
|
||||
}
|
||||
|
||||
// Key-Value Observing Support
|
||||
/*
|
||||
- addObserver:forKeyPath:options:context:
|
||||
- removeObserver:forKeyPath:
|
||||
- removeObserver:forKeyPath:context:
|
||||
*/
|
||||
|
||||
- (NSUInteger)_countForObject: (id)object // required override...
|
||||
{
|
||||
return 1;
|
||||
|
|
Loading…
Reference in a new issue