• 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: Opening previous document by default
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
References: 
 >Opening previous document by default (From: "John A. Debay" <email@hidden>)

  • Prev by Date: Re: Opening Finder window from another app
  • Next by Date: Re: TrollTech releases QT for Mac under GPL
  • Previous by thread: Re: Opening previous document by default
  • Next by thread: CFReadStreamCreateForHTTPRequest()
  • Index(es):
    • Date
    • Thread