On May 17, 2005, at 10:43 PM, mmalcolm crawford wrote:
On May 17, 2005, at 7:22 PM, Lee Morgan wrote:
When working with CoreData I've noticed that there isn't really a "sub array" style to the database - that is it seems like a pure flat database...
I'm not sure what this means? It's up to you to define relationships between entities...
Sorry, trying to get across my *perspective* there more than anything else. What I meant was that when I code an array "master item" that contains another array "sub items" then each master item would have it's own sub items array. However from what I've seen in CoreData modeling when I create an entity "master item" that has a to-many relationship to another entity "sub item", all "sub items" are grouped into one large array. Hope that made more sense. I have a "master item" entity which contains a to-many relationship to it's "sub item" entities. The sub items entities have a reverse lookup (to-one relationship). This allows a sub item entity to "belong" to a master item. The problem I'm having is that in my GUI I have a table which shows all master items. In this table I have a column which *should* show all sub items of the corresponding master item. However I can't find a proper key path to bind the table's pop up menu cell to the arrangedObjects master items -> sub items.
How was this set up before you started using Core Data? In particular, what were the bindings for the popup in the table view?
Before I had an array of "sub item names" and an array of "sub item values" (since each sub item is called the same thing, but has their own value). I would thing bind the pop up menu cell contentValues to "appControllerAlias.selection.subItemNames" // Panther code And then bind the pop up menu cell selectedValue to masterArrayController.arrangedObjects.properties.selectedSubItem
So you see, what I'm needing is the segregation of sub item arrays per master item (or at least a GUI segregation). Then the ability to have a pop up menu cell show it's corresponding master item's sub item's names. With the selected sub item object bound to the masterArray.properties.selectedSubItem so that I know which one the user has selected at any given time.
Hope that clears things up a bit, and thanks for the speedy reply mmalc.
- lee |