Re: document architecture question
Re: document architecture question
- Subject: Re: document architecture question
- From: Graham Cox <email@hidden>
- Date: Tue, 11 Jan 2011 16:08:46 +1100
On 11/01/2011, at 2:01 PM, Shane wrote:
> My main app controller inherits from NSWindowController
What does this mean? This sounds all sorts of wrong.
First off, most apps don't have an 'app controller', though they do very often have an app delegate. Typically that's just an object, not an NSWindowController.
If you have the standard document architecture, you should have a nib that represents a document, containing its window(s), their controllers and the NSDocument subclass that your document is based on. (In the default doc-based project, this is called 'MyDocument').
Menu commands should target nil, so that they find their way to the frontmost document. If you have connected them directly to some controller (perhaps this mysterious 'app controller'), then they will only operate on that object.
--Graham
_______________________________________________
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