Re: Opening previous document by default
Re: Opening previous document by default
- Subject: Re: Opening previous document by default
- From: "M. Uli Kusterer" <email@hidden>
- Date: Sat, 21 Jun 2003 11:00:06 +0200
At 14:31 Uhr -0500 20.06.2003, John A. Debay wrote:
Im having trouble seeing how my document
controller can distinguish between opening a document by default when the
application is created but opening a new document when directed to by the
user.
Default answer 26b: You can use a flag (BOOL). Set it to YES at
startup (in your application delegate or whatever) and only open the
prev document when this flag is YES. After you've opened the previous
document, set this flag to NO. That way, it will behave odd at
startup, and from then on it'll behave just like it used to.
BTW -- you may have to check to make sure your app's been opened
without a document at startup. You can do that by setting your flag
in response to the "open application" Apple Event, which is sent
instead of "open document" when your app's launched without
documents. There may even be an openApplication method in
NSApplication already.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.