Hi,

For my NSDocument based application, I'm trying to display an alert as a sheet 
on the document window when the user drops a file on a custom view in that 
window.

In the custom view implementation, I'm sending a message from 
performDragOperation: to the current document's windowcontroller to display the 
alert sheet. This works fine if my application is active when the user drops 
the file on the view.

However, when my application is not active when the file is dropped, the 
message to the windowcontroller is never sent.

Here's the relevant line of code in performDragOperation:

[[[[[NSDocumentController sharedDocumentController] currentDocument] 
windowControllers] objectAtIndex:0]
        alertImageDragInDesignWithURL:[NSURL URLFromPasteboard:pboard]];

I've found a workaround by activating my app in the view's draggingEntered: 
method, but I'd rather not take focus away from the user like this.

Any help would be appreciated.

-- 
Luc Van Bogaert

_______________________________________________

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

This email sent to arch...@mail-archive.com

Reply via email to