mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
simplify
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32512 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
06fb16d6e3
commit
cc2de01684
1 changed files with 10 additions and 26 deletions
|
@ -198,11 +198,6 @@ setup()
|
|||
NSString *keyPathToForward;
|
||||
}
|
||||
|
||||
+ (id) forwarderWithKeyPath: (NSString *)keyPath
|
||||
ofObject: (id)object
|
||||
withTarget: (id)aTarget
|
||||
context: (void *)context;
|
||||
|
||||
- (id) initWithKeyPath: (NSString *)keyPath
|
||||
ofObject: (id)object
|
||||
withTarget: (id)aTarget
|
||||
|
@ -1263,17 +1258,6 @@ replacementForClass(Class c)
|
|||
|
||||
@implementation NSKeyValueObservationForwarder
|
||||
|
||||
+ (id) forwarderWithKeyPath: (NSString *)keyPath
|
||||
ofObject: (id)object
|
||||
withTarget: (id)aTarget
|
||||
context: (void *)context
|
||||
{
|
||||
return [[self alloc] initWithKeyPath: keyPath
|
||||
ofObject: object
|
||||
withTarget: aTarget
|
||||
context: context];
|
||||
}
|
||||
|
||||
- (id) initWithKeyPath: (NSString *)keyPath
|
||||
ofObject: (id)object
|
||||
withTarget: (id)aTarget
|
||||
|
@ -1303,11 +1287,11 @@ replacementForClass(Class c)
|
|||
dot = [remainingKeyPath rangeOfString: @"."];
|
||||
if (dot.location != NSNotFound)
|
||||
{
|
||||
child = [NSKeyValueObservationForwarder
|
||||
forwarderWithKeyPath: remainingKeyPath
|
||||
ofObject: [object valueForKey: keyForUpdate]
|
||||
withTarget: self
|
||||
context: NULL];
|
||||
child = [[NSKeyValueObservationForwarder alloc]
|
||||
initWithKeyPath: remainingKeyPath
|
||||
ofObject: [object valueForKey: keyForUpdate]
|
||||
withTarget: self
|
||||
context: NULL];
|
||||
observedObjectForForwarding = nil;
|
||||
}
|
||||
else
|
||||
|
@ -1490,11 +1474,11 @@ replacementForClass(Class c)
|
|||
dot = [aPath rangeOfString:@"."];
|
||||
if (dot.location != NSNotFound)
|
||||
{
|
||||
forwarder = [NSKeyValueObservationForwarder
|
||||
forwarderWithKeyPath: aPath
|
||||
ofObject: self
|
||||
withTarget: anObserver
|
||||
context: aContext];
|
||||
forwarder = [[NSKeyValueObservationForwarder alloc]
|
||||
initWithKeyPath: aPath
|
||||
ofObject: self
|
||||
withTarget: anObserver
|
||||
context: aContext];
|
||||
[info addObserver: anObserver
|
||||
forKeyPath: aPath
|
||||
options: options
|
||||
|
|
Loading…
Reference in a new issue