I'm writing an application for OSX (Lion) using Xcode 4.
Hitting a bit of a wall with this one and the internet has thus-far proved not particularly helpful.
I have a document defined, as well as the MainMenu.xib and a document window; The document window is of course what gets created when a document is loaded / created, and therefore has access to the relevant data.
I want to utilise Cocoa Bindings as much as possible in this project, so my question is this:
If I create another View (let's say an NSViewController with a linked Nib); how do I allow it access to the data for the document?
I've tried adding an #import for the document class, but that causes issues when I add the #import on the document class to the view controller (to create it) - I get unknown type compile errors.
I've also gone down the route of passing interim objects around (and even accessing getters / setters after creating the view controller); surely there must be a better, cleaner way?
The application has just the one NSWindowController (the default) and that is it, it's vanilla from the XCode non-core data document-based application template.
Thanks for your help, Clint