Re: check if app opens with a document on startup
Re: check if app opens with a document on startup
- Subject: Re: check if app opens with a document on startup
- From: Jens Alfke <email@hidden>
- Date: Sat, 24 May 2008 16:55:21 -0700
On 23 May '08, at 9:12 AM, Torsten Curdt wrote:
Hm ...somehow missed that response. But got it working myself. It's
actually much simpler:
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
int documentCount = [[[NSDocumentController
sharedDocumentController] documents] count];
Of course that only works if (a) you're using NSDocument to open all
files, and (b) all the open-file requests actually succeeded in
opening documents.
—Jens
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden