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:
Fred Kiefer 2007-12-15 14:36:28 +00:00
parent f25c62f57b
commit 456a4cd97f
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>
* Source/NSTextField.m: Move some KVB to NSControl, add binding

View file

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

View file

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