KUNCUserNotificationDisplayFromBundle callback not being called
KUNCUserNotificationDisplayFromBundle callback not being called
- Subject: KUNCUserNotificationDisplayFromBundle callback not being called
- From: Benedict Slaney <email@hidden>
- Date: Mon, 4 Aug 2003 04:55:22 +1200
In my kext, KUNCUserNotificationDisplayFromBundle is not calling the
function I provide a pointer to when the user clicks a button on the
dialog it displays.
here is the relevant part of the source in my kext:
//globals
KUNCUserNotificationCallBack dialogCallBack_p;
void * dialogCallBack(int contextKey,int responseFlags,void *xmlData);
//end globals
//start relevant part of function
dialogCallBack_p=dialogCallBack;
ret=KUNCUserNotificationDisplayFromBundle(KUNCGetNotificationID(),
"/System/Library/Extensions/SampleFilterScheme.kext",
"Messages",
"dict",
"Password Message",
"",
dialogCallBack_p,
context);
//end relevant part of function
However, the callback function "dialogCallBack" is not getting called
when the user clicks a button on the dialog (or at all). This stops me
from getting my required values from the dialog.
This seems to be related to the UserNotificationCenter output below:
Aug 4 04:17:43 thisones-Computer UserNotificationCenter[901]: Could
not connect the action buttonPressed: to target of class NSApplication
Aug 4 04:17:43 thisones-Computer last message repeated 3 times
Finally, this is the dict I am using for the dialog:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"
http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Password Message</key>
<dict>
<key>Alternate Button Title</key>
<string>Cancel</string>
<key>OK Button Title</key>
<string>OK</string>
<key>Header</key>
<string>Authentication Message</string>
<key>Message</key>
<string>Please enter a user name and password.</string>
<key>Timeout</key>
<string>0</string>
<key>Alert Level</key>
<string>Stop</string>
<key>Text Field Strings</key>
<array>
<string>User Name:</string>
<string>Password:</string>
</array>
<key>Password Fields</key>
<array>
<string>1</string>
</array>
<key>Blocking Message</key>
<string>1</string>
</dict>
</dict>
</plist>
Any help will be very much appreciated.
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.