NSTableViewと2つの列があります。
NSTableColumn *column = [[[NSTableColumn alloc] initWithIdentifier:@"custId"] autorelease];
[column bind:@"value" toObject:arrC2 withKeyPath:@"arrangedObjects.custId" options:nil];
[table addTableColumn:column];
column = [[[NSTableColumn alloc] initWithIdentifier:@"totalGrams"] autorelease];
[column bind:@"value" toObject:valuationArrC withKeyPath:@"arrangedObjects.totalGrams_double" options:nil];
[table addTableColumn:column];
ご覧のとおり、列はさまざまなNSArrayControllerにバインドされています。最初の列には正しい値が表示されますが、2番目の列には「(」記号が表示されます。ただし、次のように列を入れ替えると、次のようになります。
NSTableColumn *column = [[[NSTableColumn alloc] initWithIdentifier:@"totalGrams"] autorelease];
[column bind:@"value" toObject:valuationArrC withKeyPath:@"arrangedObjects.totalGrams_double" options:nil];
[table addTableColumn:column];
column = [[[NSTableColumn alloc] initWithIdentifier:@"custId"] autorelease];
[column bind:@"value" toObject:arrC2 withKeyPath:@"arrangedObjects.custId" options:nil];
[table addTableColumn:column];
次に、最初の列(最初の例では2番目)の値が表示され、2番目の列に「(」が表示されます。その動作がわかりません。2つのアレイコントローラーを1つのテーブルにバインドするにはどうすればよいですか?