I would like to launch another app from my own using the sysAppLaunchCmdGoTo
command.  First, does anyone know of working sample code for this?

This is what I'm using:

  Err      error;
  UInt     appCardNo;
  LocalID  appDbID;
  DWord    result;
  UInt     launchFlags;
  DmSearchStateType state;

  error = DmGetNextDatabaseByTypeCreator(
             true, &state, 'appl', 'addr',
             true, &appCardNo, &appDbID);

  if (error) break;    /* inside a switch statement */

  GoToParamsType   params;
  MemSet((VoidPtr) &params, sizeof(params), 0);

  error = get_db_ident(params.dbCardNo, params.dbID);
  if (error) break;

  params.recordNum = TblGetRowID(table, event->data.tblSelect.row);

  launchFlags = sysAppLaunchFlagNewGlobals | sysAppLaunchFlagUIApp;
  error = SysAppLaunch(appCardNo, appDbID, launchFlags,
            sysAppLaunchCmdGoTo, (Ptr) &params, &result);


No errors are reported, and all the values that pass through this code block
seem reasonable.  I'm not sure, though, that I'm calling SysAppLaunch
correctly, with correct flags, and/or correct params.

I can actually step over this call.  error is 0, but result is 537, which if
I figured it out correctly, is the error code dmErrAlreadyExists.  I can't
see exactly where yet that Address Book might call something that would
return this value, since it doesn't itself.

The last clue I have is that if I let the app run, I get a "bad form" error
from POSE with a stack trace that doesn't help and no source.

--
---- --- -- -
Matthew D Moss
[EMAIL PROTECTED]




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

Reply via email to