• 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: document architecture question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >document architecture question (From: Shane <email@hidden>)

  • Prev by Date: Re: NSUndoManager retain/release of arguments - ad infinitum
  • Next by Date: Re: NSUndoManager retain/release of arguments - ad infinitum
  • Previous by thread: Re: document architecture question
  • Next by thread: Base SDK 10.6 deployment target 10.5 - symbol not found
  • Index(es):
    • Date
    • Thread