【发布时间】:2011-06-21 12:06:13
【问题描述】:
我正在使用 NSTreeController 和 NSOutlineController 来显示 1parent-1child 层次结构中的内容。
我的结构是这样的:
- 家长
- 孩子
- 家长
- 孩子
现在当用户按下刷新按钮时,我想删除所有节点并重新填充。
[[treeController arrangedObjects] removeAllItems];
[[treeController arrangedObjects] removeAllObjects];
但似乎没有任何效果。
我想用NSArrayController 绑定NSTreeController 应该会有所帮助,但我真的不知道绑定-NSArrayController-NSTreeController-NSOutlineController 的步骤。
【问题讨论】:
标签: cocoa binding nsarraycontroller nstreecontroller removeall