nsdocument/nsapp delegate question
nsdocument/nsapp delegate question
- Subject: nsdocument/nsapp delegate question
- From: Alex Rice <email@hidden>
- Date: Mon, 1 Oct 2001 22:54:22 -0600
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/