• 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: Displaying an alert box
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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);


References: 
 >Re: Displaying an alert box (From: Stéphane Sudre <email@hidden>)

  • Prev by Date: Re: Alt. Background color and variable row height in NSTableView and NSOutlineView
  • Next by Date: NSNumberFormatter : another problem
  • Previous by thread: Re: Displaying an alert box
  • Next by thread: Re: Displaying an alert box
  • Index(es):
    • Date
    • Thread