mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 12:00:52 +00:00
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:
parent
98da1c006f
commit
73e00686a8
1 changed files with 21 additions and 9 deletions
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue