NSTreeController가 Core Data 상위 속성을 설정하고 하위 속성을 설정하지 않습니다.NSTreeController가 Core Data 하위 속성을 설정하지 않습니다.
나는이
Item
title (string)
isLeaf (boolean,readonly)
parent -> Group (inverse children)
Group (parent entity Item)
children -> Item (inverse parent)
Leaf (parent entity Item)
같은 코어 데이터 모델은 그때 NSOutlineView로 표시하고 NSTreeController를 사용하고 있습니다. 나는 [NSTreeController insertObject : atArrangedObjectIndexPath :]를 사용하여 Leaf 's를 삽입하려고 시도하지만 leaf 속성은 올바르게 설정되지만 부모 Group.children 속성은 nil로 설정되어 있습니다. 내가 콘솔 childrenKeyPath이 인터페이스 빌더에서 설정된 경우에도
Warning: <NSTreeController: 0x7fcd93c19d20>[object class: NSMutableDictionary] childrenKeyPath cannot be nil. To eliminate this log message, set the childrenKeyPath attribute in Interface Builder
에 다음과 같은 경고를 얻을 프로젝트를 실행하고 왜 NSMutableDictionary를 사용하는 경우
나는 NSManagedObject가 SavedItem, SavedGroup 및 SavedLeaf을 하위 클래스가있을 때. 몇 가지 예제를 다운로드했지만 그들이하는 일을 내가 볼 수는 없습니다.