Note that these delegate methods will not work properly until your
Info.plist has been updated to reflect the file types which your app
supports.
I've recently opened a radar on this because it doesn't appear to be
well-documented and I spent a while trying to figure out why my
delegates were never being called.
Jens Alfke wrote:
On 20 May '08, at 6:31 AM, Torsten Curdt wrote:
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.
Your delegate will get one of these calls:
- (BOOL)application:(NSApplication *)sender openFile:(NSString
*)filename;
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3
- (void)application:(NSApplication *)sender openFiles:(NSArray
*)filenames;
#endif
I think you get openFiles: if you implement that method, else it falls
back to calling openFile: one or more times.
If you don't get any of these calls before
-applicationDidFinishLaunching:, you don't have any docs to open.
---Jens
------------------------------------------------------------------------
_______________________________________________
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/johnstiles%40gmail.com
This email sent to [EMAIL PROTECTED]
_______________________________________________
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]