Re: CFUserNotificationDisplayAlert return value error?
Re: CFUserNotificationDisplayAlert return value error?
- Subject: Re: CFUserNotificationDisplayAlert return value error?
- From: Douglas Davidson <email@hidden>
- Date: Tue, 18 Apr 2006 13:36:51 -0700
On Apr 18, 2006, at 1:16 PM, Peter Hull wrote:
It seems like the implementation of CFUserNotificationDisplayAlert
doesn't match its documentation.
Here is a little test program you can use. If the user hits
"Default", the response flags should be 0. If the user hits
"Alternate", the response flags should be 1. If the user hits
"Other", the response flags should be 2. If the user hits escape or
cmd-., or if the alert times out without a response, the response
flags should be 3. The return value should be non-zero only if there
is some unexpected error along the way. This is the behavior on
10.4; the behavior on 10.2 should be similar, with the possible
exception of the escape and cmd-. handling.
Douglas Davidson
#include <CoreFoundation/CoreFoundation.h>
main() {
CFOptionFlags responseFlags;
SInt32 retval = CFUserNotificationDisplayAlert(60.0, 0, NULL,
NULL, NULL, CFSTR("Alert Header"), CFSTR("Alert message."), CFSTR
("Default"), CFSTR("Alternate"), CFSTR("Other"), &responseFlags);
printf("retval 0x%x responseFlags 0x%x\n", retval, responseFlags);
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden