但是对于这些绑定,我有以下错误:
[<NSApplication 0x101a032c0> valueForUndefinedKey:]: this class is not key value coding-compliantNSUnknownKeyException', reason: '[<NSApplication 0x101a032c0> valueForUndefinedKey:]: this class is not key value coding-compliant
如果我创建一个字符串数组(通过键值编码),其中包含第一次存储在App Delegate中的托管对象实体属性的名称,我会得到一个没有任何问题的NSStrings数组。如果我随后在代码中从相同的入口点进行相同的调用,则相同的集合将变成一个空对象数组-即使核心数据上下文中的任何内容都没有更改。:[[entity attributesByName] allValues]];
// Extract the names of the attributes with Key-Value Coding