• 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: start window inside and NSDocument based application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: start window inside and NSDocument based application


  • Subject: Re: start window inside and NSDocument based application
  • From: Patrick Meirmans <email@hidden>
  • Date: Wed, 4 Jan 2006 12:39:03 -0500

Here's how I would do it (so not necessarily the best way):

-If your NSApplication subclass has no delegate, create a new class to be the delegate of your NSApplication subclass.
-To not open an empty document on launch, let this delegate return NO for the delegate method: applicationShouldOpenUntitledFile:
-You can now display your start window. A logical way to do so would be using the applicationDidFinishLaunching: notification.
-To also display the start window when there are no more empty windows, i.e. when the user closes the last window, you can simply register for a NSWindowWillCloseNotification and count the number of remaining visible windows.


Best, Patrick

On 3 Jan, 2006, at 21:54, Benjamin Dunton wrote:

All,

I am trying to figure out how to have a start window (a window that would allow the user to open a previous document, create new document, e.g. iMovie when you launch). I want this to be the starting point for the user. Also, when no document windows are open, I want this window to appear. How do I shoe horn this in before the NSDocumentController creates a NSDocument?

Thanks,

Ben
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden


_______________________________________________ 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: start window inside and NSDocument based application
      • From: Benjamin Dunton <email@hidden>
References: 
 >start window inside and NSDocument based application (From: Benjamin Dunton <email@hidden>)

  • Prev by Date: **JOB LISTING**
  • Next by Date: Re: Checkboxes in Table Views
  • Previous by thread: start window inside and NSDocument based application
  • Next by thread: Re: start window inside and NSDocument based application
  • Index(es):
    • Date
    • Thread