Mac OS X:主从界面和 Cocoa 绑定
我有一个主从界面。在“主部分”中,我显示人员列表,在“详细信息部分”中,我显示所选人员的详细信息,包括该人拥有的事物列表:
master part detail part
| |
v v
+--------------------+------------------------+
| Person1 | Detail of Person2 |
| Person2 (selected) | |
| Person3 | Thing1 of person2 |
| Person4 | Thing2 of person2 |
| Person5 | Thing3 of person2 |
+--------------------+------------------------+
人和事物都放置在核心数据管理的数据中模型。
“主部分”在 NSWindowController 中进行管理,其中我有一个 NSArrayController 通过 Cocoa Bindings 连接到我的人员实体。
“细节部分”在单独的 NSViewController 中管理。
从这个细节 - NSViewController 可以使用Cocoa Bindings来访问主部分中选定的人吗?可以从 Interface Builder 中做到这一点吗?
I have a master-detail interface. In the "master part" I show a list of people, in the "detail part" I show the detail of the selected person, including a list of things that the person has:
master part detail part
| |
v v
+--------------------+------------------------+
| Person1 | Detail of Person2 |
| Person2 (selected) | |
| Person3 | Thing1 of person2 |
| Person4 | Thing2 of person2 |
| Person5 | Thing3 of person2 |
+--------------------+------------------------+
People and things are placed in a Core Data-managed data model.
The "master part" is managed in the NSWindowController in which I have a NSArrayController connected, through Cocoa Bindings, to my people entities.
The "detail part" is managed in a separated NSViewController.
From this detail-NSViewController it is possible to use Cocoa Bindings to access to the selected person in the master part? It is possible to do that from Interface Builder?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
感谢这篇文章解决了:跨多个绑定选择在单个窗口界面中查看控制器
Solved thanks to this post: Binding selection across multiple view controllers in a single window interface