* 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:
Gregory John Casamento 2006-08-26 22:28:47 +00:00
parent 63e4a9aebd
commit aaa0f632ce
3 changed files with 12 additions and 2 deletions

View file

@ -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:]

View file

@ -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];

View file

@ -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: