Re: Displaying an alert box
Re: Displaying an alert box
- Subject: Re: Displaying an alert box
- From: Marc Laffitte <email@hidden>
- Date: Mon, 15 Oct 2001 12:56:17 +0200
Using CFUserNotification is probably the better way.
You may also force your app be the front one with:
[NSApp activateIgnoringOtherApps:YES];
However, the user may NOT apreciate: If he is typing some text, which is
a common task on a computer, he may type Return, just for a new line. If
at that moment some other app displays an alert, with a default button
OK / Return while the user is looking either at his keyboard or at some
paper, he will dismiss that alert, just seeing that something happend,
but not knowing what exactly... Or the text he is typing will go to
nowhere , ie to the new front window...
Such things happen regularily on Windows based computers and is really
annoying. I don't think Windows UI practices should be considered as a
good example ;-)
Regards,
Marc
On lundi, octobre 15, 2001, at 12:17 , Stiphane Sudre wrote:
On dimanche, octobre 14, 2001, at 05:02 , David McCabe wrote:
How about in Objective-C?
On Saturday, October 13, 2001, at 06:32 PM, Simon Wright wrote:
On Saturday, October 13, 2001, at 08:30 PM, David McCabe wrote:
Greetings,
I would like to have my application display an alert panel which
comes to the foreground above all other applications. Despite the
simplicity of this task, I have found nothing in the documentation
about displaying alerts of any kind, except a small bit on sheets.
Can any of you help?
Thanks!
How about CFUserNotification ?
SInt32 CFUserNotificationDisplayAlert(CFTimeInterval timeout,
CFOptionFlags flags, CFURLRef iconURL, CFURLRef soundURL, CFURLRef
localizationURL, CFStringRef alertHeader, CFStringRef alertMessage,
CFStringRef defaultButtonTitle, CFStringRef alternateButtonTitle,
CFStringRef otherButtonTitle, CFOptionFlags *responseFlags);