• 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: How do I insure that my NSDocument subclass is not initialized before I open a document?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I insure that my NSDocument subclass is not initialized before I open a document?


  • Subject: Re: How do I insure that my NSDocument subclass is not initialized before I open a document?
  • From: Kyle Sluder <email@hidden>
  • Date: Tue, 28 Jul 2009 13:03:40 -0700

On Tue, Jul 28, 2009 at 12:41 PM, Korei Klein<email@hidden> wrote:
> I have a subclass of NSDocument which is initialized whenever I open a new
> document and when my application is first started.
> How do I change the application such that my subclass is not initialized
> when I start the application?

This is a FAQ.  Return NO from your app delegate's
-applicationShouldOpenUntitledFile: method.

Also, it is expected that the application will create an untitled file
when opened or its dock icon is clicked when it has no other documents
open.  There are sometimes good reasons for changing this behavior,
but please ensure that you have one before doing this.

--Kyle Sluder
_______________________________________________

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: 
 >How do I insure that my NSDocument subclass is not initialized before I open a document? (From: Korei Klein <email@hidden>)

  • Prev by Date: Re: Something is wrong
  • Next by Date: Re: How do I insure that my NSDocument subclass is not initialized before I open a document?
  • Previous by thread: How do I insure that my NSDocument subclass is not initialized before I open a document?
  • Next by thread: Re: How do I insure that my NSDocument subclass is not initialized before I open a document?
  • Index(es):
    • Date
    • Thread