int menuIndex = fMenus->find(const_cast<SkOSMenu *>(menu));
if (menuIndex >= 0 && menuIndex < fMenus->count()) {
NSUInteger first = 0;
- for (NSInteger i = 0; i < menuIndex; ++i) {
+ for (int i = 0; i < menuIndex; ++i) {
first += (*fMenus)[i]->getCount();
}
[fItems removeObjectsInRange:NSMakeRange(first, [fItems count] - first)];
}
- (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row {
- int columnIndex = [tableView columnWithIdentifier:[tableColumn identifier]];
+ NSInteger columnIndex = [tableView columnWithIdentifier:[tableColumn identifier]];
if (columnIndex == 0) {
const SkOSMenu::Item* item = ((SkOptionItem*)[fItems objectAtIndex:row]).fItem;
NSString* label = [NSString stringWithUTF8String:item->getLabel()];
- (NSCell *)tableView:(NSTableView *)tableView dataCellForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row {
if (tableColumn) {
- int columnIndex = [tableView columnWithIdentifier:[tableColumn identifier]];
+ NSInteger columnIndex = [tableView columnWithIdentifier:[tableColumn identifier]];
if (columnIndex == 1)
return [((SkOptionItem*)[fItems objectAtIndex:row]).fCell copy];
else
}
- (void)tableView:(NSTableView *)tableView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row {
- int columnIndex = [tableView columnWithIdentifier:[tableColumn identifier]];
+ NSInteger columnIndex = [tableView columnWithIdentifier:[tableColumn identifier]];
if (columnIndex == 1) {
SkOptionItem* option = (SkOptionItem*)[self.fItems objectAtIndex:row];
NSCell* storedCell = option.fCell;
}
- (void)tableView:(NSTableView *)tableView setObjectValue:(id)anObject forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row {
- int columnIndex = [tableView columnWithIdentifier:[tableColumn identifier]];
+ NSInteger columnIndex = [tableView columnWithIdentifier:[tableColumn identifier]];
if (columnIndex == 1) {
SkOptionItem* option = (SkOptionItem*)[self.fItems objectAtIndex:row];
NSCell* cell = option.fCell;