【发布时间】:2009-08-17 09:36:19
【问题描述】:
我有一个NSTableView 绑定到一个NSArrayController,它绑定到一个带有一个实体的NSManagedObjectContext。如何以编程方式在表视图中当前选择的对象上设置属性?我试过直接通过
[[[documentsController arrangedObjects] objectAtIndex:[tableView selectedRow]] setObject:[NSDate date] forKey:@"dateProperty"]
但这给了我一个例外:
-[_NSControllerArrayProxy selection]: unrecognized selector sent to instance 0x79430c0
我尝试将表选择绑定到 NSObjectController 并在其上设置值,但没有成功。
【问题讨论】:
标签: cocoa cocoa-bindings nstableview