NSSwitchCells 列を NSArrayController にバインドしました。ON/OFFの値は正しく表示されるのですが、クリックしても値が変わりません。スイッチ ボックスは、クリックの視覚的なフィードバックを提供しますが、値は同じままです (オンまたはオフ)。
私はあらゆる種類のバインディングオプションを試しました。
NSDictionary *bindingOptions = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithInteger:1], NSContinuouslyUpdatesValueBindingOption,
[NSNumber numberWithInteger:1], NSRaisesForNotApplicableKeysBindingOption,
[NSNumber numberWithInteger:1], NSConditionallySetsEditableBindingOption,
[NSNumber numberWithInteger:1], NSValidatesImmediatelyBindingOption,
nil];
[tableColumn bind:@"value" toObject:currentItemsArrayController withKeyPath:[NSString stringWithFormat:@"arrangedObjects.%@", editedColumnmetadata.columnBindingKeyPath] options:bindingOptions];
[(NSButtonCell*)cell setButtonType:NSSwitchButton];
[cell setTitle:@""];
[tableColumn setDataCell:cell];
ありがとう
UPDATE:(セルへのバインディング?)
//[tableColumn bind:@"value" toObject:currentItemsArrayController withKeyPath:[NSString stringWithFormat:@"arrangedObjects.%@", editedColumnmetadata.columnBindingKeyPath] options:bindingOptions];
[cell bind:@"objectValue" toObject:currentItemsArrayController withKeyPath:[NSString stringWithFormat:@"arrangedObjects.%@", editedColumnmetadata.columnBindingKeyPath] options:bindingOptions];