• 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: Correct use of NSViewController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Correct use of NSViewController


  • Subject: Re: Correct use of NSViewController
  • From: Jonathan Dann <email@hidden>
  • Date: Thu, 20 Mar 2008 11:35:14 +0000


Hi Cathy,

Thanks again for your advice. I've got it working now and I'm almost back I where I was before refactoring, I'm now running into a bindings problem.

Before using the view controllers I had put 2 tree controllers in my window controller's nib, 2 outline views were then bound to these and the tree controllers themselves got their content from an object controller that was bound to the the keypath [(Window Controller) File's Owner].document. So the object controller was a proxy for my document and the tree controllers had shorter keypath to traverse to get to the array they needed in my document subclass.

Now when I do this I have the tree controllers and the document proxy object controller in my view controller's nib. The only way I can see to getting to the document is using the keypath

[File's Owner].view.window.windowController.document

However this does not work, seems convoluted, and I get the following:

KVO autonotifying only supports -set<Key>: methods that return void. Autonotifying will not be done for invocations of -[NSSplitView _setWindow:]

So my view controller needs to know about its 'owning' document somehow and I can't see how to get it.

Have you run into this. I'm not sure getting the current document from the document controller will work as that will change ad the user opens more documents.

Thanks again,

Jon

P.S. Out of interest, what do you develop?
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Correct use of NSViewController
      • From: Paul Szego <email@hidden>
    • Re: Correct use of NSViewController
      • From: Cathy Shive <email@hidden>
References: 
 >Correct use of NSViewController (From: Jonathan Dann <email@hidden>)
 >Re: Correct use of NSViewController (From: Cathy Shive <email@hidden>)
 >Re: Correct use of NSViewController (From: Jonathan Dann <email@hidden>)
 >Re: Correct use of NSViewController (From: Cathy Shive <email@hidden>)

  • Prev by Date: Job Opportunity: Box Services hiring a full-time Cocoa User Interface Developer, New York City
  • Next by Date: [JOB]: Cocoa Developer with OpenGL Experience
  • Previous by thread: Re: Correct use of NSViewController
  • Next by thread: Re: Correct use of NSViewController
  • Index(es):
    • Date
    • Thread