FROM : Michele Balistreri
DATE : Thu Aug 10 20:48:08 2006
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_removed>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/mbalistreri%
> 40briksoftware.com
>
> This email sent to <email_removed>
DATE : Thu Aug 10 20:48:08 2006
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_removed>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/mbalistreri%
> 40briksoftware.com
>
> This email sent to <email_removed>
| Related mails | Author | Date |
|---|---|---|
| Simon Liu | Aug 10, 18:31 | |
| Michele Balistreri | Aug 10, 20:48 | |
| Simon Liu | Aug 10, 23:04 |






Cocoa mail archive

