check if app opens with a document on startup
check if app opens with a document on startup
- Subject: check if app opens with a document on startup
- From: Torsten Curdt <email@hidden>
- Date: Tue, 20 May 2008 15:31:58 +0200
I have a document based application. The AppController prevents empty
documents to be created at startup with
- (BOOL) applicationShouldOpenUntitledFile:(NSApplication *)sender
{
return NO;
}
All good. But I was wondering if it is possible to find out if the
application has been opened by dragging a document onto it.
First though was to hook into
- (BOOL)loadDataRepresentation:(NSData *)data ofType:(NSString *)aType;
and set a flag in the AppController. But loadDataRepresentation is
called after the AppController has been executed awakeFromNib.
So I cannot distinguish it from a normal "Open" from the menu.
Any suggestion on how to do this? ...I am not really sure what to
search for.
cheers
--
Torsten
_______________________________________________
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