• 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: Starting window instead of a new untitled document?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Starting window instead of a new untitled document?


  • Subject: Re: Starting window instead of a new untitled document?
  • From: James Bucanek <email@hidden>
  • Date: Mon, 31 Jul 2006 18:46:58 -0700

Michael Nickerson wrote on Monday, July 31, 2006:

>
>On Jul 31, 2006, at 7:02 PM, James Bucanek wrote:
>
>>
>> But now I'd like to implement a "getting started" window that
>> prompts the user to create a new file or open an existing one. I
>> want this window to appear ONLY when the application is started
>> without opening an existing document. Searching the archives, the
>> advice has been to create this window in
>> applicationWillFinishLaunching:. But I don't want to see the window
>> every time. I only want it to appear if the application was
>> launched without a document to open.
>>
>>
>> Is there a better way?
>>
>> --
>> James Bucanek
>
>Why not just put a call to display your "getting started" window from
>-applicationShouldOpenUntitledFile:?
>
>You could still return NO in that case, and then won't need to
>rewrite what you already have.

I thought of that, but it seemed rather hackish and makes a lot of assumptions about when and how often this call gets made (after all, it could be called twice or three times some day). It seemed to make more sense to override makeUntitledDocumentOfType:error: since you should be guaranteed that the framework would only send that message at a time appropriate to creating a new document window, and that the framework wouldn't decide one day to call it twice for some reason.

--
James Bucanek
 _______________________________________________
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

References: 
 >Re: Starting window instead of a new untitled document? (From: Michael Nickerson <email@hidden>)

  • Prev by Date: Size of menu or menu item
  • Next by Date: window title (newbie question)
  • Previous by thread: Re: Starting window instead of a new untitled document?
  • Next by thread: Re: Starting window instead of a new untitled document?
  • Index(es):
    • Date
    • Thread