Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Welcome page in doc-based app

Welcome page in doc-based app
Thread Tools
Woofy31
Fresh-Faced Recruit
Join Date: Sep 2009
Status: Offline
Reply With Quote
Sep 4, 2009, 09:07 AM
 
I'm having some problems with document-based apps.. well, i managed to set up the app, using a window controller for the doc's window, and in that window i have some panels serving as inspectors, and now i realised i missed something!


I need some help for the following issues:

1) i want to make a splash screen (a window that appears when you open the app and loads some settings, like photoshop)

2) after the splash screen loads all the settings needed by the app, i don't want the app to load a new document.. could i change this behaviour ? why do i want that ? well, i want to load a window that shows the user some recent documents and a link for making a new document, so the user will create the new document, not the app (like dreamweaver's "welcome" page that shows up when the app has started, hides when the user chooses to create/open a document, and shows back up when the user closes all open documents)... i just need some guidelines, some hints on how i could do that..


Is it possible to make these things in a doc-based app ? or do i have to make a window based app and hardcode it to simulate a doc-based app ?
     
Brass
Professional Poster
Join Date: Nov 2000
Location: Tasmania, Australia
Status: Offline
Reply With Quote
Sep 30, 2009, 10:05 PM
 
What you want to achieve is fairly simple. One way would be to use an instance of an object set as the NSApplication's delegate and implementing a couple of methods from the NSApplicationDelegate protocol. Specifically:

1. - (void)applicationDidFinishLaunching:(NSNotificatio n *)aNotification
You could use this to display a splash screen. Of course you'll have to remove the splash screen using some other method after all of your other loading is complete.

2. - (BOOL)applicationShouldOpenUntitledFile:(NSApplica tion *)sender
You could use this to return NO which would prevent it from opening a new untitled document when the application starts, and when the running application is clicked on the Dock. Before returning NO, you could have this method open your window containing a list of recent documents.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 05:09 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,