• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Display alert sheet when application is not active
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Display alert sheet when application is not active


  • Subject: Display alert sheet when application is not active
  • From: Luc Van Bogaert <email@hidden>
  • Date: Sun, 11 Nov 2012 13:09:59 +0100

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 (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

  • Follow-Ups:
    • Re: Display alert sheet when application is not active
      • From: Quincey Morris <email@hidden>
    • Re: Display alert sheet when application is not active
      • From: Jerry Krinock <email@hidden>
  • Prev by Date: Re: How do I get the identifier of the currently connected network interface?
  • Next by Date: Core Data fetch performance
  • Previous by thread: Re: How do I get the identifier of the currently connected network interface?
  • Next by thread: Re: Display alert sheet when application is not active
  • Index(es):
    • Date
    • Thread