cocoa绑定嵌套在 nscollectionviewitem 中的 nstableview
我有一个正在运行的核心数据应用程序,我想显示一些实体的表示。我已经使用 Interface Builder“Core Data Entity Assistant”设置了一个 NSCollectionView 来设置集合(在 MyDocument.xib 中生成了一个视图),并且可以访问简单的 returnedObject.attributes 以及简单的关系属性。
我的问题是多对多关系,我想将其显示为嵌套在集合项中的表。我已经为 NSTableColumns 尝试了不同的 shownObject 键路径组合,但没有找出正确的可可绑定咒语来深入数据。
EntityA (reprensented in the Collection) <WORKS>
. EntityB (simple relationship) <WORKS with representedObject.relationship.attr>
.. EntityC (to-many-relationsip of EntityB) <how to get there???>
截至目前,99% 的代码是通过核心数据模型和 Interface Builder 生成的。我并不反对对某些东西进行子类化以获得所需的行为,但我更愿意让事情尽可能自动化——特别是因为这应该“只适用于”原样的类。使用 Xcode 3.2.5 —— 如果有人告诉我那里的绑定更明确,我不介意跳到 4GM。
I have a working Core Data app and I want to display a representation for some of the Entities. I have set up an NSCollectionView with the Interface Builder "Core Data Entity Assistant" to setup the collection (generated a View in the MyDocument.xib), and can access simple representedObject.attributes, as well as simple relationship attributes.
my problem is with the to-many Relationships, which I would like to display as tables nested in the Collection item. I have tried different representedObject keypath combinations for the NSTableColumns, but did not figure out the correct cocoa binding incantation to drill down the data.
EntityA (reprensented in the Collection) <WORKS>
. EntityB (simple relationship) <WORKS with representedObject.relationship.attr>
.. EntityC (to-many-relationsip of EntityB) <how to get there???>
as of right now 99% of the code is generated through the Core Data Model and by Interface Builder. I am not opposed to subclassing something to get the desired behavior but I would prefer to keep things as automated as possible -- especially since this should "just work" with the as-is classes. using Xcode 3.2.5 -- I don't mind jumping to 4GM if someone tells me the bindings are more explicit there.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论