From b439de410c5b662e2d9a77b2fd5cfc6479315346 Mon Sep 17 00:00:00 2001 From: Richard Frith-MacDonald Date: Fri, 12 Nov 1999 12:29:14 +0000 Subject: [PATCH] Tidied git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5169 72102866-910b-0410-8b05-ffd578937521 --- Source/NSMatrix.m | 52 ++++++++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 21 deletions(-) diff --git a/Source/NSMatrix.m b/Source/NSMatrix.m index 58f2cde99..bef6e7206 100644 --- a/Source/NSMatrix.m +++ b/Source/NSMatrix.m @@ -173,31 +173,12 @@ static SEL getSel = @selector(objectAtIndex:); numberOfColumns: 0]; } -- (id) initWithFrame: (NSRect)frameRect +- (id) _privateFrame: (NSRect)frameRect mode: (int)aMode - cellClass: (Class)class - numberOfRows: (int)rowsHigh - numberOfColumns: (int)colsWide -{ - self = [self initWithFrame: frameRect - mode: aMode - prototype: nil - numberOfRows: rowsHigh - numberOfColumns: colsWide]; - [self setCellClass: class]; - return self; -} - -- (id) initWithFrame: (NSRect)frameRect - mode: (int)aMode - prototype: (NSCell*)prototype numberOfRows: (int)rows numberOfColumns: (int)cols { - [super initWithFrame: frameRect]; - myZone = [self zone]; - [self setPrototype: prototype]; [self _renewRows: rows columns: cols rowSpace: 0 colSpace: 0]; mode = aMode; [self setFrame: frameRect]; @@ -222,10 +203,39 @@ static SEL getSel = @selector(objectAtIndex:); { selectedRow = selectedColumn = 0; } - return self; } +- (id) initWithFrame: (NSRect)frameRect + mode: (int)aMode + cellClass: (Class)class + numberOfRows: (int)rowsHigh + numberOfColumns: (int)colsWide +{ + self = [super initWithFrame: frameRect]; + + [self setCellClass: class]; + return [self _privateFrame: frameRect + mode: aMode + numberOfRows: rowsHigh + numberOfColumns: colsWide]; +} + +- (id) initWithFrame: (NSRect)frameRect + mode: (int)aMode + prototype: (NSCell*)prototype + numberOfRows: (int)rowsHigh + numberOfColumns: (int)colsWide +{ + self = [super initWithFrame: frameRect]; + + [self setPrototype: prototype]; + return [self _privateFrame: frameRect + mode: aMode + numberOfRows: rowsHigh + numberOfColumns: colsWide]; +} + - (void) dealloc { int i;