• 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
Re: Alert dialog in agent app?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Alert dialog in agent app?


  • Subject: Re: Alert dialog in agent app?
  • From: Nick Zitzmann <email@hidden>
  • Date: Thu, 27 Aug 2009 17:47:30 -0600


On Aug 27, 2009, at 5:03 PM, Gabriel Zachmann wrote:

My Cocoa application has the plist flag "application is background only" set.
(I believe, this is the former LSUIElement property.)

No; LSUIElement is still around, but if you have the friendly key view turned on (which is the default setting), it's called "application is agent (UI element)" or something like that.


Now I would like to display an alert dialog.

Unfortunately, this does not work; it even seems it makes the application hang

LSBackgroundOnly apps can connect to the window server, but can't display a UI, IIRC. You have two choices:


1. Make your app use LSUIElement instead, where this will work, though you'll have to manually bring the alert to the front using - activateIgnoringOtherApps:.

2. Use the CFUserNotification API instead of NSAlert.

Nick Zitzmann
<http://www.chronosnet.com/>

_______________________________________________

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


References: 
 >Alert dialog in agent app? (From: Gabriel Zachmann <email@hidden>)

  • Prev by Date: Re: CALayer drawing delay
  • Next by Date: Re: Reasons why QL would fail to create thumbnail?
  • Previous by thread: Alert dialog in agent app?
  • Next by thread: Re: Alert dialog in agent app?
  • Index(es):
    • Date
    • Thread