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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to