mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 16:10:48 +00:00
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:
parent
8344db0adf
commit
ae1ba8d249
1 changed files with 13 additions and 2 deletions
|
@ -47,6 +47,7 @@
|
|||
//
|
||||
id _nsTextfieldCellClass = nil;
|
||||
|
||||
|
||||
//
|
||||
// Class methods
|
||||
//
|
||||
|
@ -82,10 +83,20 @@ id _nsTextfieldCellClass = nil;
|
|||
|
||||
- (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];
|
||||
c = [_nsTextfieldCellClass new];
|
||||
c = [cellClass new];
|
||||
[self setCell: c];
|
||||
[c release];
|
||||
[cell setState: 1];
|
||||
|
|
Loading…
Reference in a new issue