title: Core Data bindings with subviews and multiple NIBs
body: <p>I have a document-based Core Data app. My main Core Data entity has several string fields, most of which are bound to NSTextFields, but one is bound to an NSTextView.</p>
  
  <p>I am using the technique for view switching (with multiple view controllers) as explained in the Hillegass book. All of my subviews are controlled by a ManagedViewController, my subclass of NSViewController that has a managedObjectContext field.</p>
  
  <p>My subview exists in a separate nib file. For some reason, the bindings I have set up in that nib are not working--but if I set up the widgets and the bindings in the exact same way in the main nib file instead, they work fine.</p>
  
  <p>See image:</p>
  
  <p><a href="http://img180.imageshack.us/img180/3391/screenshot.gif" rel="nofollow noreferrer">Screenshot http://img180.imageshack.us/img180/3391/screenshot.gif</a></p>
  
  <p>In the main nib file, I have a tree controller whose managedObjectContext is bound to File's Owner's mOC (File's Owner is MyDocument). The NSTextField's value (yes, value--it's not rich text) is bound to treeController.selection.content (where content is a string property of the entity.) No problem. This works fine. </p>
  
  <p>In the second nib file, I have another tree controller whose managedObjectContext is bound to File's Owner's mOC (File's Owner is my ManagedViewController). The NSTextField's value is bound the same way as above.</p>
  
  <p>In my code, I have tested to make sure that the two managedObjectContexts refer to the same object. They do, and it's not nil.</p>
  
  <p>I don't get an error--it's just that the values never bind with NSTextViews in the subview. They're always nil.</p>
  
  <p>Also, I have tried NSTextFields--same problem.</p>
  
  <p>Any ideas on how to make Core Data bindings play nicely with subviews and multiple NIBs?</p>