• 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: NSDocument newbie
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDocument newbie


  • Subject: Re: NSDocument newbie
  • From: John Stiles <email@hidden>
  • Date: Tue, 26 Jul 2005 17:13:35 -0700

It actually turns out that you need to override - (BOOL) applicationShouldOpenUntitledFile:(NSApplication *)theApplication.
If you have -applicationOpenUntitledFile: return NO, it doesn't seem to change anything :)
I was worried that this would prevent File->New from working, but no, it does exactly what I wanted. Thanks :)



On Jul 26, 2005, at 4:51 PM, SA Dev wrote:


Look into NSApplication's -applicationOpenUntitledFile: delegate method. You need to create an app delegate, connect it, then implement this function (return NO or maybe check a user pref and return that).




On Jul 26, 2005, at 7:11 PM, John Stiles wrote:


Now I have another NSDocument question. Instead of having my app open up with a meaningless blank document, I'd like for it to start up showing the Open dialog. How can I do this? Or at the very least, how can I make the empty document at startup go away?




_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: NSDocument newbie
      • From: SA Dev <email@hidden>
References: 
 >Re: NSDocument newbie (From: James Bucanek <email@hidden>)
 >Re: NSDocument newbie (From: John Stiles <email@hidden>)
 >Re: NSDocument newbie (From: John Stiles <email@hidden>)
 >Re: NSDocument newbie (From: SA Dev <email@hidden>)

  • Prev by Date: Re: Icon question
  • Next by Date: Re: Icon question
  • Previous by thread: Re: NSDocument newbie
  • Next by thread: Re: NSDocument newbie
  • Index(es):
    • Date
    • Thread