* Source/NSTableView.m (-numberOfRows): Return the current number

of rows not the internal cached value.
  Replace some occurences of int with NSInteger
  and unsigned with NSUInteger.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37461 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2013-12-13 15:08:32 +00:00
parent 078ad71cec
commit f4ef0ffb77
2 changed files with 21 additions and 14 deletions

View file

@ -1,3 +1,10 @@
2013-12-13 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSTableView.m (-numberOfRows): Return the current number
of rows not the internal cached value.
Replace some occurences of int with NSInteger
and unsigned with NSUInteger.
2013-12-08 Fred Kiefer <FredKiefer@gmx.de> 2013-12-08 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSClipView.m (-setBounds:, -setBoundsSize:): Use * Source/NSClipView.m (-setBounds:, -setBoundsSize:): Use

View file

@ -2102,7 +2102,7 @@ static void computeNewSelection
- (NSInteger) numberOfRows - (NSInteger) numberOfRows
{ {
return _numberOfRows; return [self _numRows];
} }
/* /*
@ -3050,7 +3050,7 @@ byExtendingSelection: (BOOL)flag
/* Ask the delegate if we can select all columns or rows */ /* Ask the delegate if we can select all columns or rows */
if (_selectingColumns == YES) if (_selectingColumns == YES)
{ {
if ([_selectedColumns count] == (unsigned)_numberOfColumns) if ([_selectedColumns count] == (NSUInteger)_numberOfColumns)
{ {
// Nothing to do ! // Nothing to do !
return; return;
@ -3070,14 +3070,14 @@ byExtendingSelection: (BOOL)flag
} }
else // selecting rows else // selecting rows
{ {
if ([_selectedRows count] == (unsigned)_numberOfRows) if ([_selectedRows count] == (NSUInteger)_numberOfRows)
{ {
// Nothing to do ! // Nothing to do !
return; return;
} }
{ {
int row; NSInteger row;
for (row = 0; row < _numberOfRows; row++) for (row = 0; row < _numberOfRows; row++)
{ {
@ -3314,7 +3314,7 @@ byExtendingSelection: (BOOL)flag
NSText *t; NSText *t;
NSTableColumn *tb; NSTableColumn *tb;
NSRect drawingRect; NSRect drawingRect;
unsigned length = 0; NSUInteger length = 0;
if (rowIndex != _selectedRow) if (rowIndex != _selectedRow)
{ {
@ -4036,20 +4036,20 @@ static BOOL selectContiguousRegion(NSTableView *self,
return notified; return notified;
} }
- (void) keyDown:(NSEvent *)theEvent - (void) keyDown: (NSEvent *)theEvent
{ {
int oldRow = -1; NSInteger oldRow = -1;
int currentRow = _selectedRow; NSInteger currentRow = _selectedRow;
int originalRow = -1; NSInteger originalRow = -1;
NSString *characters = [theEvent characters]; NSString *characters = [theEvent characters];
unsigned int len = [characters length]; NSUInteger len = [characters length];
unsigned int modifiers = [theEvent modifierFlags]; NSUInteger modifiers = [theEvent modifierFlags];
int rowHeight = [self rowHeight]; CGFloat rowHeight = [self rowHeight];
NSRect visRect = [self visibleRect]; NSRect visRect = [self visibleRect];
BOOL modifySelection = YES; BOOL modifySelection = YES;
NSPoint noModPoint = NSZeroPoint; NSPoint noModPoint = NSZeroPoint;
int visRows; NSInteger visRows;
unsigned int i; NSUInteger i;
BOOL gotMovementKey = NO; BOOL gotMovementKey = NO;
// will not contain partial rows. // will not contain partial rows.