Hi,my app doesn't start after sysNotifyKeyboardDialogEvent. I use a 
PalmOS 4.1 ROM in the emulator.
I wrote the code:

static void RegisterForNotifications()
   {
     // UInt16 cardNo;
      LocalID dbID='SKPR'; //my app
 
      if (0 != SysCurAppDatabase(0, &dbID))
         return; // shouldn't ever fail, but just in case.
 
      // Tell the system we want to know when 
      // the keyboard anywhere is launched. Right?
      SysNotifyRegister(0, dbID, sysNotifyKeyboardDialogEvent, NULL, 
sysNotifyNormalPriority, 0);
}

 static void HandleNotification(SysNotifyParamType *np)
   {
      if (np->notifyType == sysNotifyKeyboardDialogEvent)
       SysUIAppSwitch(0, 'SKPR', sysAppLaunchCmdNormalLaunch, NULL);
}

static UInt32 JetTextPalmMain(
    UInt16 cmd, 
    MemPtr /*cmdPBP*/, 
    UInt16 launchFlags)
{
    Err error;

   // error = RomVersionCompatible (ourMinVersion, launchFlags);
   // if (error) return (error);

    switch (cmd)
    {
    case sysAppLaunchCmdNormalLaunch:
        error = AppStart();
        if (error) 
            return error;

        // start application by opening the main form
        // and then entering the main event loop
        FrmGotoForm(MainForm);
        AppEventLoop();    
        AppStop();
        break;
        //for Keyboardreplacement:
        case sysAppLaunchCmdSystemReset:
   case sysAppLaunchCmdSyncNotify:  // sent when our app is installed
      RegisterForNotifications();
      break;
 
   case sysAppLaunchCmdNotify:
      HandleNotification((SysNotifyParamType *)cmd);
      break;
        
    default:
        break;
    }

    return errNone;
}




-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to