Re: DocumentController - detect source of request to open document?
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