i was looking into the possibilities of launching sub apps from a host app.
i have the following function occasionally work (yet i am not sure why
because of its intermitency).  the function is called after exiting the
event loop,  and closing all db's.  the commented line has a 0 for the
launch flags because of the doc's (thought it might help) but still working
on and off.  does anyone have a few guidelines when going from a host to a
sub and then back to the host?  or some snippets?

thanx
Charles

 UInt            card=0;
 LocalID            id;
 Err     err = sysErrNotAllowed;
 DmSearchStateType stateInfo;
 switch(DmGetNextDatabaseByTypeCreator(true, &stateInfo, 'appl', 'SUR9',
true, &card, &id)) {
  case 0:
   err = SysAppLaunch( card, id, sysAppLaunchFlagNewGlobals  |
sysAppLaunchFlagNewStack, cmd, cmdPBP, ret );
///   err = SysAppLaunch( card, id, 0, cmd, cmdPBP, ret );
   switch(err) {
    case sysErrParamErr:
     FrmCustomAlert(TestAlert, "sysErrParamErr", NULL, NULL);
     break;
    case memErrNotEnoughSpace:
     FrmCustomAlert(TestAlert, "memErrNotEnoughSpace", NULL, NULL);
     break;
    case sysErrOutOfOwnerIDs:
     FrmCustomAlert(TestAlert, "sysErrOutOfOwnerIDs", NULL, NULL);
     break;
   }
   break;
  case dmErrCantFind:
   FrmCustomAlert(TestAlert, "dmErrCantFind", NULL, NULL);
   break;
 }
    return err;
}



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to