• 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: DocumentController - detect source of request to open document?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DocumentController - detect source of request to open document?


  • Subject: Re: DocumentController - detect source of request to open document?
  • From: Michele Balistreri <email@hidden>
  • Date: Thu, 10 Aug 2006 20:48:08 +0200

I never tried this in a document based application, however when an application is opened the openFile..method is called before the NSApplicationDidFinishLaunch notification is sent, so i make a BOOL which i set to a value in the init method and change its value in the handler of that notification. Based on the status of that BOOL if the application was open by finder or dragging a file on it or it was open by double clicking on it.

Il giorno 10/ago/06, alle ore 18:31, Simon Liu ha scritto:

Is there a way to detect who/what requested an application to open a
document?  I'd like my application to start up differently, if the
user launched a document from the Finder.

Normally my application has a main window.  When launching a document
from the Finder, I only want the application to display the document
window, and not the main window.

Is there a way to ask/subclass the shared document controller to do this?

Thanks,
Simon
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40briksoftware.com


This email sent to email@hidden

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: DocumentController - detect source of request to open document?
      • From: "Simon Liu" <email@hidden>
References: 
 >DocumentController - detect source of request to open document? (From: "Simon Liu" <email@hidden>)

  • Prev by Date: RE: Threads and synchronization
  • Next by Date: Strange memory leak with AsyncSocket and multithreading
  • Previous by thread: DocumentController - detect source of request to open document?
  • Next by thread: Re: DocumentController - detect source of request to open document?
  • Index(es):
    • Date
    • Thread