mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 15:11:37 +00:00
* Source/NSTableView.m: initWithCoder: minor cleanup.
* Source/NSTextFieldCell.m: initWithCoder retain text/background colors to prevent crash. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23339 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
63e4a9aebd
commit
aaa0f632ce
3 changed files with 12 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2006-08-26 18:25-EDT Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Source/NSTableView.m: initWithCoder: minor cleanup.
|
||||
* Source/NSTextFieldCell.m: Retain text/background colors to
|
||||
prevent crash.
|
||||
|
||||
2006-08-26 10:01-EDT Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Source/GSNibCompatibility.m: In [NSIBObjectData initWithCoder:]
|
||||
|
|
|
@ -5353,6 +5353,7 @@ static inline float computePeriod(NSPoint mouseLocationWin,
|
|||
[_headerView setTableView: self];
|
||||
[_tableColumns makeObjectsPerformSelector: @selector(setTableView:)
|
||||
withObject: self];
|
||||
|
||||
[aDecoder decodeValueOfObjCType: @encode(int) at: &_numberOfRows];
|
||||
[aDecoder decodeValueOfObjCType: @encode(int) at: &_numberOfColumns];
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_drawsGrid];
|
||||
|
|
|
@ -229,8 +229,11 @@ static NSColor *txtCol;
|
|||
|
||||
if ([aDecoder allowsKeyedCoding])
|
||||
{
|
||||
[self setBackgroundColor: [aDecoder decodeObjectForKey: @"NSBackgroundColor"]];
|
||||
[self setTextColor: [aDecoder decodeObjectForKey: @"NSTextColor"]];
|
||||
id textColor = RETAIN([aDecoder decodeObjectForKey: @"NSTextColor"]);
|
||||
id backColor = RETAIN([aDecoder decodeObjectForKey: @"NSBackgroundColor"]);
|
||||
|
||||
[self setBackgroundColor: backColor];
|
||||
[self setTextColor: textColor];
|
||||
if ([aDecoder containsValueForKey: @"NSDrawsBackground"])
|
||||
{
|
||||
[self setDrawsBackground: [aDecoder decodeBoolForKey:
|
||||
|
|
Loading…
Reference in a new issue