Changes to make inheriting decoding simpler

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7294 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2000-08-30 17:48:30 +00:00
parent 98da1c006f
commit 73e00686a8

View file

@ -100,15 +100,7 @@ static Class defaultCellClass = nil;
[self insertRow:index];
[self putCell:new_cell atRow:index column:0];
[new_cell release];
[self setValidateSize: YES];
[[NSNotificationCenter defaultCenter]
addObserver: self
selector: @selector(_setTitleWidthNeedsUpdate:)
name: _NSFormCellDidChangeTitleWidthNotification
object: new_cell];
RELEASE (new_cell);
return new_cell;
}
@ -123,6 +115,26 @@ static Class defaultCellClass = nil;
[self removeRow:index];
}
/* Overriding this method allows decoding stuff to be inherited
simpler by NSForm */
- (void) putCell: (NSCell*)newCell atRow: (int)row column: (int)column
{
if (column > 0)
{
NSLog (@"Warning: NSForm: tried to add a cell in a column > 0");
return;
}
[super putCell: newCell atRow: row column: column];
[self setValidateSize: YES];
[[NSNotificationCenter defaultCenter]
addObserver: self
selector: @selector(_setTitleWidthNeedsUpdate:)
name: _NSFormCellDidChangeTitleWidthNotification
object: newCell];
}
- (void)dealloc
{
[[NSNotificationCenter defaultCenter]