Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

nsdocument/nsapp delegate question



Hi, I have Cocoa design problem I need some advice around. I would like my NSDocument app to do something like this- in pseudo code:

if launched via app icon
if user preference, open previous document
else create untitled doc
else if launched via a saved document
open only that document

Where I'm stuck is that I need find out in applicationWillFinishLaunching: whether or not the app was launched via a document or via the app. But, application:openFile: is not sent until after applicationWillFinishLaunching: and by the time applicationDidFinishLaunching: is sent, there is already an untitled document opened automatically. How else can I check how the app was launched via a document?

TIA

Alex Rice <email@hidden>
Mindlube Software
http://www.mindlube.com/




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.