mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-02 05:10:58 +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
78ad07afc1
commit
c7767e47e5
1 changed files with 13 additions and 2 deletions
|
@ -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];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue