diff --git a/ChangeLog b/ChangeLog index ad575596e..bad809cd2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-12-12 Fred Kiefer + + * Source/NSNibBindingConnector.m (-establishConnection): Swap + destination and source. + * Source/NSKeyValueBinding.m: Started rework. + 2007-12-12 Fred Kiefer * Source/NSKeyValueBinding.m (GSBindingUnbindAll): Return if table diff --git a/Source/NSKeyValueBinding.m b/Source/NSKeyValueBinding.m index a299a72f8..b0b9478ee 100644 --- a/Source/NSKeyValueBinding.m +++ b/Source/NSKeyValueBinding.m @@ -167,7 +167,9 @@ static inline void setup() id observedObject; NSString *keyPath; - setup(); + if (!objectTable) + return; + [bindingLock lock]; bindings = (NSMutableDictionary *)NSMapGet(objectTable, (void *)self); if (bindings != nil) @@ -184,6 +186,10 @@ static inline void setup() [bindingLock unlock]; } +// FIXME: This method should not be defined on this class, as it make all +// other value observation impossible. Better add a new GSBinding class +// to handle this. Perhaps with plenty of specific subclasses for the +// different special cases? - (void) observeValueForKeyPath: (NSString *)keyPath ofObject: (id)object change: (NSDictionary *)change diff --git a/Source/NSNibBindingConnector.m b/Source/NSNibBindingConnector.m index 621de4daa..4e8014354 100644 --- a/Source/NSNibBindingConnector.m +++ b/Source/NSNibBindingConnector.m @@ -94,8 +94,8 @@ - (void) establishConnection { - [_dst bind: _binding - toObject: _src + [_src bind: _binding + toObject: _dst withKeyPath: _keyPath options: _options]; }