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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to