OK,

thanks to the information Ben supplied:

>>BTW, the creator codes for the new PIM apps are 'PAdd' for Contacts, 'PDat'
>>for Calendar, 'PMem' for Memos, and 'PTod' for Tasks.


and Ron's suggestion:

>>Are you sure an application with the creator sysFileCDatebook exists on
>>a Tungsten E? Check the creator signature of the Calendar application.
>>If different, does that one work?


I did some further checking and yes the problem seems to be a new application! Guys thanks!

Scott Schmitz
RealtyJuggler


Here's my modified launch code, if anyone has the same problem:


void TDateBookDatabase::GoDateBook(UInt16 inRecordNum)
{
        GoToParamsType*                         gotoParamsP;
        UInt16                                          launchCmd = 
sysAppLaunchCmdNormalLaunch;
        MemPtr                                          launchParamsP = NULL;
        Err                                                     err = 0;

// If we're emulating, do nothing so that Gremlins can be run without quitting when we ask to switch applications
#if EMULATION_LEVEL != EMULATION_NONE
return;
#endif


#ifdef DEBUG
        CheckDBLeaks(GetDatabasePtr());
#endif

// Create the param block (system is responsible for disposal)
if (inRecordNum != dmMaxRecordIndex)
{
gotoParamsP = (GoToParamsType*)MemPtrNew(sizeof(GoToParamsType));
if (gotoParamsP)
{
// Fill it in
MemPtrSetOwner(gotoParamsP, 0);
gotoParamsP->recordNum = inRecordNum;
gotoParamsP->matchPos = 0; // put cursor at start of string
gotoParamsP->matchFieldNum = 0; // same for Datebook and ToDo
gotoParamsP->searchStrLen = 0; // length of match (for Datebook, ignored by ToDo)
gotoParamsP->matchCustom = 0; // length of match (for ToDo, ignored by Datebook)


// err = GetCardNo(gotoParamsP->dbCardNo);

err = DmOpenDatabaseInfo(GetDatabasePtr(), &gotoParamsP->dbID, NULL, NULL, &gotoParamsP->dbCardNo, NULL);
launchCmd = sysAppLaunchCmdGoTo;
launchParamsP = gotoParamsP;
if (err)
ErrNonFatalDisplayIf(!dbID, "Could not find DateBook Database");
}
else
{
ErrFatalDisplay("Not enough memory to go to requested record");
}
}

{ // now we launch, newer Palms have new Datebook application
DmSearchStateType searchState;
UInt16 cardNo;
LocalID dbID;


err = DmGetNextDatabaseByTypeCreator(true, &searchState, sysFileTApplication, 'PDat', true, &cardNo, &dbID);
if (err)
err = DmGetNextDatabaseByTypeCreator(true, &searchState, sysFileTApplication, sysFileCDatebook, true, &cardNo, &dbID);

ErrNonFatalDisplayIf(err, "Could not find DateBook");
if (dbID)
{
err = SysUIAppSwitch(cardNo, dbID, launchCmd, (MemPtr)launchParamsP);
ErrNonFatalDisplayIf(err, "Could not launch app");
}
// AppLaunchWithCommand('PDat', launchCmd, launchParamsP);
}

// AppLaunchWithCommand(sysFileCDatebook, launchCmd, launchParamsP);
}



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

Reply via email to