• 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: Basic Q: Where is the best place to open a drawer?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Basic Q: Where is the best place to open a drawer?


  • Subject: Re: Basic Q: Where is the best place to open a drawer?
  • From: Quincey Morris <email@hidden>
  • Date: Mon, 19 Jul 2010 14:37:01 -0700

On Jul 19, 2010, at 13:33, Rick Mann wrote:

> I have a basic NSDocument-based app with no window controllers.

There really isn't such a thing. A "basic" NSDocument object creates its own window controller behind the scenes (see the 'windowNibName' method). Conversely, a NSDocument object that you somehow forced to operate without a window controller couldn't be considered "basic".

The easiest solution is to create a window controller subclass that overrides 'windowDidLoad' to change the window's state. You'd then replace your document's 'windowNibName' method with a 'makeWindowControllers' method that creates an instance of your subclass and invokes 'addWindowController:'.


_______________________________________________

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

  • Follow-Ups:
    • Re: Basic Q: Where is the best place to open a drawer?
      • From: Rick Mann <email@hidden>
    • Re: Basic Q: Where is the best place to open a drawer?
      • From: Rick Mann <email@hidden>
References: 
 >Basic Q: Where is the best place to open a drawer? (From: Rick Mann <email@hidden>)

  • Prev by Date: Re: Basic Q: Where is the best place to open a drawer?
  • Next by Date: Re: Basic Q: Where is the best place to open a drawer?
  • Previous by thread: Re: Basic Q: Where is the best place to open a drawer?
  • Next by thread: Re: Basic Q: Where is the best place to open a drawer?
  • Index(es):
    • Date
    • Thread