fix a couple ssues with 64bit NSInteger

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@40099 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Paul Landers 2016-09-21 20:54:58 +00:00
parent afdb6075a1
commit 3b3388e8ad
2 changed files with 10 additions and 5 deletions

View file

@ -2308,12 +2308,17 @@ Also returns the child index relative to this parent. */
objectValueForTableColumn:column objectValueForTableColumn:column
byItem:item]; byItem:item];
draggedItemString = [draggedObject description];
// Pad the string to match its indentation level: // Pad the string to match its indentation level:
int level = [self levelForRow:row]; int level = [self levelForRow:row];
NSString *pad = [@"" stringByPaddingToLength:(level*4) if (level > 0)
withString:@" " {
startingAtIndex:0]; NSString *pad = [@"" stringByPaddingToLength:(level*4)
draggedItemString = [pad stringByAppendingString:[draggedObject description]]; withString:@" "
startingAtIndex:0];
draggedItemString = [pad stringByAppendingString:draggedItemString];
}
} }
return draggedItemString; return draggedItemString;
} }

View file

@ -5552,7 +5552,7 @@ This method is deprecated, use -columnIndexesInRect:. */
// Build a string of texts, each representing a line from the tableView, // Build a string of texts, each representing a line from the tableView,
// separated by "\n": // separated by "\n":
NSString *descriptionsList = nil; NSString *descriptionsList = nil;
unsigned int index = [rows firstIndex]; NSInteger index = [rows firstIndex];
while (index != NSNotFound) while (index != NSNotFound)
{ {
NSString *draggedItemString = [self _objectStringForTableColumn:[cols objectAtIndex:0] NSString *draggedItemString = [self _objectStringForTableColumn:[cols objectAtIndex:0]