2 列の NSTableView を作成しているときに問題が発生しました。
行の対応する列の値をどのように設定しますか? 行の列にいる必要があると思いcolText
ますが、達成するのはほとんど不可能のようです。
コードは次のとおりです。
- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex {
uint32_t size = *((uint32_t *)[[itemSizes objectAtIndex:rowIndex] bytes]);
NSString *colText = [NSString stringWithFormat:@"%d bytes", size];
return [objNames objectAtIndex:rowIndex];
}
私は[objNames objectAtIndex:rowIndex]
左の列にいたいのですが、どちらがcolText
右ですか?
私は少し立ち往生しています。
どんな助けでも感謝します。