* Source/NSTableView.m: Add nil check to make sure that the

nil values set for certain keys don't get set since they are
	normally set by connections later in the nib loading process. 
	I'm not sure why IB includes these when they're set to nil.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30082 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2010-03-31 04:02:03 +00:00
parent c5e1f2e6a2
commit bb7df81e99
2 changed files with 44 additions and 10 deletions

View file

@ -1,3 +1,10 @@
2010-03-31 00:02-EDT Gregory John Casamento <greg.casamento@gmail.com>
* Source/NSTableView.m: Add nil check to make sure that the
nil values set for certain keys don't get set since they are
normally set by connections later in the nib loading process.
I'm not sure why IB includes these when they're set to nil.
2010-03-30 Fred Kiefer <FredKiefer@gmx.de>
* Headers/AppKit/NSNib.h: Make NSNibOwner and NSNibTopLevelObjects

View file

@ -5704,28 +5704,55 @@ This method is deprecated, use -columnIndexesInRect:. */
ASSIGN(_tableColumns, [NSMutableArray array]);
ASSIGN(_sortDescriptors, [NSArray array]);
//
// Check for nil on some of these, since they are usually set
// in NSIBOutletConnector objects we don't want to override
// that setting unless they're directly encoded with the
// object.
//
// I'm not sure why IB encodes nil values for these, but
// the behaviour here should match that on Mac OS X.
//
if ([aDecoder containsValueForKey: @"NSDataSource"])
{
[self setDataSource: [aDecoder decodeObjectForKey: @"NSDataSource"]];
}
id obj = [aDecoder decodeObjectForKey: @"NSDataSource"];
if(obj != nil)
{
[self setDataSource: obj];
}
}
if ([aDecoder containsValueForKey: @"NSDelegate"])
{
[self setDelegate: [aDecoder decodeObjectForKey: @"NSDelegate"]];
}
id obj = [aDecoder decodeObjectForKey: @"NSDelegate"];
if(obj != nil)
{
[self setDelegate: obj];
}
}
if ([aDecoder containsValueForKey: @"NSTarget"])
{
[self setTarget: [aDecoder decodeObjectForKey: @"NSTarget"]];
}
id obj = [aDecoder decodeObjectForKey: @"NSTarget"];
if(obj != nil)
{
[self setTarget: obj];
}
}
if ([aDecoder containsValueForKey: @"NSAction"])
{
NSString *action = [aDecoder decodeObjectForKey: @"NSAction"];
[self setAction: NSSelectorFromString(action)];
}
if(action != nil)
{
[self setAction: NSSelectorFromString(action)];
}
}
if ([aDecoder containsValueForKey: @"NSDoubleAction"])
{
NSString *action = [aDecoder decodeObjectForKey: @"NSDoubleAction"];
[self setDoubleAction: NSSelectorFromString(action)];
}
if(action != nil)
{
[self setDoubleAction: NSSelectorFromString(action)];
}
}
if ([aDecoder containsValueForKey: @"NSBackgroundColor"])
{