我认为这很简单,但在2天后我承认失败。 任务很简单:
在用户界面中,显示&从包含在myClass中的NSMutableDictionary中的键/值对编辑单个NSString值。在Interface Builder中访问NSMutableDictionary值
这里是代码提取物:
myClass:
NSMutableDictionary *settings;
settings = [[NSMutableDictionary alloc] init];
[settings setObject:@"2400" forKey:@"test"];
在IB:
- 文件的所有者类= myClass的
- NSDictionaryController内容字典势必文件的所有者型号关键路径 '设置'
- 势必DictionaryController arrangedObjects的NSTextField型号关键路径 '测试'
产生错误: [<_NSControllerKeyValuePair 0x1001db3d0> valueForUndefinedKey:]: this class is not key value coding-compliant for the key test.
任何意见和帮助,非常感谢。
对不起,初始化完成了,我只是忘了把它包含在上面的代码中。 – helioz 2013-02-21 10:04:49