mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 18:50:48 +00:00
Do not retain/release the data source; it's like a delegate
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11171 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
83067345eb
commit
e4af172ea3
1 changed files with 6 additions and 4 deletions
|
@ -283,7 +283,6 @@ _isCellEditable (id delegate, NSArray *tableColumns,
|
||||||
|
|
||||||
- (void) dealloc
|
- (void) dealloc
|
||||||
{
|
{
|
||||||
TEST_RELEASE (_dataSource);
|
|
||||||
RELEASE (_gridColor);
|
RELEASE (_gridColor);
|
||||||
RELEASE (_backgroundColor);
|
RELEASE (_backgroundColor);
|
||||||
RELEASE (_tableColumns);
|
RELEASE (_tableColumns);
|
||||||
|
@ -556,7 +555,8 @@ _isCellEditable (id delegate, NSArray *tableColumns,
|
||||||
@"tableView:objectValueForTableColumn:row:"];
|
@"tableView:objectValueForTableColumn:row:"];
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSIGN (_dataSource, anObject);
|
/* We do *not* retain the dataSource, it's like a delegate */
|
||||||
|
_dataSource = anObject;
|
||||||
[self tile];
|
[self tile];
|
||||||
[self reloadData];
|
[self reloadData];
|
||||||
}
|
}
|
||||||
|
@ -2290,7 +2290,9 @@ byExtendingSelection: (BOOL)flag
|
||||||
float x_pos;
|
float x_pos;
|
||||||
|
|
||||||
if (_dataSource == nil)
|
if (_dataSource == nil)
|
||||||
return;
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* Using columnAtPoint: here would make it called twice per row per drawn
|
/* Using columnAtPoint: here would make it called twice per row per drawn
|
||||||
rect - so we avoid it and do it natively */
|
rect - so we avoid it and do it natively */
|
||||||
|
@ -2869,7 +2871,7 @@ byExtendingSelection: (BOOL)flag
|
||||||
|
|
||||||
self = [super initWithCoder: aDecoder];
|
self = [super initWithCoder: aDecoder];
|
||||||
|
|
||||||
_dataSource = RETAIN([aDecoder decodeObject]);
|
_dataSource = [aDecoder decodeObject];
|
||||||
_tableColumns = RETAIN([aDecoder decodeObject]);
|
_tableColumns = RETAIN([aDecoder decodeObject]);
|
||||||
_gridColor = RETAIN([aDecoder decodeObject]);
|
_gridColor = RETAIN([aDecoder decodeObject]);
|
||||||
_backgroundColor = RETAIN([aDecoder decodeObject]);
|
_backgroundColor = RETAIN([aDecoder decodeObject]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue