Moved initialization code to another callable function, for different

cell classes between NSSecureTextField/NSTextField.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5026 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
tremblay2 1999-10-18 19:24:45 +00:00
parent 78ad07afc1
commit c7767e47e5

View file

@ -47,6 +47,7 @@
// //
id _nsTextfieldCellClass = nil; id _nsTextfieldCellClass = nil;
// //
// Class methods // Class methods
// //
@ -82,10 +83,20 @@ id _nsTextfieldCellClass = nil;
- (id) initWithFrame: (NSRect)frameRect - (id) initWithFrame: (NSRect)frameRect
{ {
NSTextFieldCell *c; return [self _initFieldWithFrame:frameRect cellClass:_nsTextfieldCellClass];
}
/*
===============
-_initFieldWithFrame:cellClass:
===============
*/
- (id)_initFieldWithFrame:(NSRect)frameRect cellClass:(Class)cellClass
{
id c;
[super initWithFrame: frameRect]; [super initWithFrame: frameRect];
c = [_nsTextfieldCellClass new]; c = [cellClass new];
[self setCell: c]; [self setCell: c];
[c release]; [c release];
[cell setState: 1]; [cell setState: 1];