• 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: Core Data: Master-Detail question <-- 'contextSet' binding doesn't appear to work.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data: Master-Detail question <-- 'contextSet' binding doesn't appear to work.


  • Subject: Re: Core Data: Master-Detail question <-- 'contextSet' binding doesn't appear to work.
  • From: mmalcolm crawford <email@hidden>
  • Date: Sat, 24 Dec 2005 00:16:18 -0800


On Dec 23, 2005, at 8:31 PM, Frederick C. Lee wrote:

Instead of the 'Core Recipe' paradigm, I'm using a geography paradigm.

I think you mean domain, not paradigm...

I've been coding the back end and have loaded the NSMangedObjectContext with master-detail:
Region Entity -->> Country Entity -->> SubRegion Entity -->> City Entity.

Have you implemented the inverse relationships?

Via Interface Builder:
Two NSArrayControllers: {RegionArrayController --->> CountryArrayController}
I'm using the Model Key Path set to 'country' relationship link.
CountryArrayController: {Attributes: Entiy-->"Country"; Binding: contextSet = selection.country(RegionArrayController); managedObjectContext = managedObjectContext(File's Owner)}
[...]
My problem: CountryArrayController's 'contextSet' binding doesn't appear to work.

Presumably 'contentSet'...

RegionArrayController: {Attributes: Entity->"Region"; Binding: managedObjectContext = managedObjectContext(File's Owner)}
The contents of the Country NSTableView is the arrangedObjects binding from the CountryArrayController.
--------------------
But if I DON'T use the contextSet binding in the CountryArrayController, I DO get DATA as per back-end supplied for both the region NSPopupButton and the NSTableView Country data.
Am I missing something here?

Probably the Region pop-up's 'selectedIndex' binding (which should be made to the RegionArrayController's 'selectionIndex').

If the Country array is populated even if its 'contentSet' is not bound, I would guess that the "Automatically Prepares Content" flag is set (see <http://developer.apple.com/documentation/Cocoa/ Conceptual/CocoaBindings/Concepts/CntrlContent.html#//apple_ref/doc/ uid/TP40002147-183071>).

mmalc

_______________________________________________
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
References: 
 >RE: Core Data: Master-Detail question <-- 'contextSet' binding doesn't appear to work. (From: "Frederick C. Lee" <email@hidden>)

  • Prev by Date: Re: What's the name of the color used in xCode status bar?
  • Next by Date: Re: Does NSButton wrap long titles?
  • Previous by thread: RE: Core Data: Master-Detail question <-- 'contextSet' binding doesn't appear to work.
  • Next by thread: What's the name of the color used in xCode status bar?
  • Index(es):
    • Date
    • Thread