Re: Display alert sheet when application is not active
Re: Display alert sheet when application is not active
- Subject: Re: Display alert sheet when application is not active
- From: Quincey Morris <email@hidden>
- Date: Sun, 11 Nov 2012 10:03:02 -0800
On Nov 11, 2012, at 04:09 , Luc Van Bogaert <email@hidden> wrote:
> 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]];
Is this line being executed and "the message to the windowcontroller is never sent", or is this line not executed?
I'd assume the former, and guess it's not being sent because "currentDocument" is nil when you app isn't active.
It seems an odd, haphazard way to find the window controller. Why not '[self.window.windowController alertImageDragInDesignWithURL:[NSURL URLFromPasteboard:pboard]]'?
_______________________________________________
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