Re: single-document application
Re: single-document application
- Subject: Re: single-document application
- From: Uli Kusterer <email@hidden>
- Date: Thu, 30 Mar 2006 11:12:32 +0200
Am 30.03.2006 um 08:49 schrieb desktoast music productions:
How do I tell my multi-doc app to open with a specific document
whenever
launched?
I suppose you still want it to open the requested document if the
user double-clicked a document, right?
The "safe" way would be to go Carbon and handle the "oapp" Apple
Event. This event is only sent when your app was opened without a
document.
The chicken's way out would be to do a delayed performSelector:
that opens your other document on applicationDidFinishLaunching and
to cancel the perform whenever a document is opened. Of course if the
machine is under a lot of load, your delay may elapse even though the
user requested to open a document, and you'll add to the load by
unnecessarily opening the old document and the one that was double-
clicked.
Actually opening the document is fairly simple IIRC. Just as the
NSDocumentController to do that.
Wonder if I should’ve started out with a not document-based app?
No.
Cheers,
-- M. Uli Kusterer
http://www.zathras.de
_______________________________________________
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