• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CoreData and arrays owned by arrays...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreData and arrays owned by arrays...


  • Subject: Re: CoreData and arrays owned by arrays...
  • From: Lee Morgan <email@hidden>
  • Date: Tue, 17 May 2005 23:21:33 -0400

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
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: CoreData and arrays owned by arrays...
      • From: Lee Morgan <email@hidden>
References: 
 >CoreData and arrays owned by arrays... (From: Lee Morgan <email@hidden>)
 >Re: CoreData and arrays owned by arrays... (From: mmalcolm crawford <email@hidden>)

  • Prev by Date: Re: Timeout for NSCell's trackMouse:inRect:ofView:untilMouseUp:
  • Next by Date: Re: Figuring out which values are selected in an NSTableView
  • Previous by thread: Re: CoreData and arrays owned by arrays...
  • Next by thread: Re: CoreData and arrays owned by arrays...
  • Index(es):
    • Date
    • Thread