Re: Alert dialog in agent app?
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