On 1 Jul 2009, at 18:26, Quincey Morris wrote:
Either you have to defeat the modularization by binding to File's Owner.windowController.whatever (File's Owner being the view controller subclass, of course, and windowController being a property you added to it)
This is how I do it, but I don't add a windowController property to each of the the view controllers. I instead add a parentController outlet typed as id; which allows the parent to be either a window controller or another view controller.
Then add a -windowController getter in an NSViewController category which walks the parentController chain and finds the top-level controller which -isKindOfClass:[NSWindowController class]
This retains the modularity of the view controllers and still provides simple access to the window controller's properties and document.
Keith _______________________________________________ Cocoa-dev mailing list ([email protected]) 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]
