I am not clear on whether you should receive a duplicate error message when you register for a notification a second time.
I have not researched or tested this behavior. But I can look at some of our code to see how we handled this. However, you should first determine if you have: 1. a registration problem ----or---- 2. a problem handling the notification. I do not see in your post that you really know. My approach to testing #1 would be to put a FrmAlert message in the code which handles the sysAppLaunchCmdNotify launch code. Does this message ever appear? To test #2, using codewarror. Adjust your project settings, Debugger, Palm OS Debuggin. Set the Launch Code to sysAppLaunchCmdNotify . Step thru your code and see if you can find what is going wrong. You may have to dummy-up (no offense to the dummies out there), the Notification parameters that you would typically expect to be passed. But you need to find if #1 or #2 is working/not working. HTH SWP <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I am new to Palm programming and I try to develop an application which >keeps track of how many times certain applications stored on my handheld >are launched. To do so, I follow these steps: > > 1. I get the card number and database ID of the applications I want to > track using DmGetNextDatabaseByTypeCreator(true, stateInfoP, 'appl', 'xxxx', > true, &cardNo, &dbID) (where 'xxxx' is the 4 letter creator ID of the > application I want to track, not the application I try to develop). I make > sure that the function returns errNone and it always does. > 2. I then register to receive notifications from the applications for > which I just got the card number and database ID using > SysNotifyRegister(cardNo, dbID, sysNotifyAppQuittingEvent, NULL, > sysNotifyNormalPriority, NULL). I make sure that the function returns > errNone and it does. > 3. I added code in the PilotMain to handle the sysAppLaunchCmdNotify > launchcode so that my application's preference is updated during a > sysNotifyAppQuittingEvent event. > > Unfortunately, my application's preference is never updated which tells me > that my application never receives the notifications. Besides, when I > close and restart my application, I should get the > sysNotifyErrDuplicateEntry error when I register the other applications > again (to indicate that my application is already registered to receive > notifications from the other applications) but I don't (I get the errNone > instead). > > Can anyone tell me what I am doing wrong? Thanks. > -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
