• 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
nsdocument/nsapp delegate question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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/


  • Follow-Ups:
    • Re: nsdocument/nsapp delegate question
      • From: "John C. Randolph" <email@hidden>
  • Prev by Date: Re: Possible Nib problem
  • Next by Date: Re: nsdocument/nsapp delegate question
  • Previous by thread: Re: Possible Nib problem
  • Next by thread: Re: nsdocument/nsapp delegate question
  • Index(es):
    • Date
    • Thread