Two small bug fixes.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25748 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2007-12-15 14:36:28 +00:00
parent 0b14647109
commit c3c507203b
3 changed files with 14 additions and 7 deletions

View file

@ -1,3 +1,8 @@
2007-12-15 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSControl.m (-bind:...options:): Correct value binding.
* Source/NSImage.m (+imageNamed:): Don't release, autorelease the image.
2007-12-15 Fred Kiefer <FredKiefer@gmx.de> 2007-12-15 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSTextField.m: Move some KVB to NSControl, add binding * Source/NSTextField.m: Move some KVB to NSControl, add binding

View file

@ -975,12 +975,14 @@ static NSNotificationCenter *nc;
if ([binding isEqual: NSValueBinding]) if ([binding isEqual: NSValueBinding])
{ {
[self unbind: binding]; [self unbind: binding];
[[GSKeyValueOrBinding alloc] initWithBinding: @"objectValue" // FIXME: We could also do the mapping via
withName: NSValueBinding // setKeys:triggerChangeNotificationsForDependentKey:
toObject: anObject [[GSKeyValueBinding alloc] initWithBinding: @"objectValue"
withKeyPath: keyPath withName: NSValueBinding
options: options toObject: anObject
fromObject: self]; withKeyPath: keyPath
options: options
fromObject: self];
} }
else if ([binding hasPrefix: NSEnabledBinding]) else if ([binding hasPrefix: NSEnabledBinding])
{ {

View file

@ -288,7 +288,7 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
if (image != nil) if (image != nil)
{ {
[image setName: aName]; [image setName: aName];
RELEASE(image); // Retained in dictionary. AUTORELEASE(image);
image->_flags.archiveByName = YES; image->_flags.archiveByName = YES;
} }
return image; return image;