Hi,
I am quite new to Palm programming using PRC-tools.
Recently, I was trying to initialize a popup trigger and a list to retrieve
data from a database. However, I ran into some problems with the call to
CategoryInitailize. I have no idea how to create the appInfroStringRsc
needed as a 2nd parameter to CategoryInitialize.
Can anyone help to advise me on this? I would appreciate it greatly!
Thanks!!
Junbin
Enclosed : Part of the code to initialize the popup trigger and list
// Open the database.
gDatabase = DmOpenDatabaseByTypeCreator('ECAT', 'JPex',
dmModeReadWrite);
if (!gDatabase)
return NULL;
// Get database local ID and card number. We need these to
// initialize app info block.
if (DmOpenDatabaseInfo(gDatabase, &dbID, NULL, NULL, &cardNo,
NULL))
return NULL;
// Allocate app info in storage heap.
h = DmNewHandle(gDatabase, sizeof(AppInfoType));
if (!h) return NULL;
// Associate app info with database.
appInfoID = MemHandleToLocalID (h);
DmSetDatabaseInfo(cardNo, dbID, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, &appInfoID, NULL, NULL, NULL);
// Initialize app info block to 0.
appInfoP = MemHandleLock(h);
DmSet(appInfoP, 0, sizeof(AppInfoType), 0);
// Initialize the categories.
CategoryInitialize ((AppInfoPtr) appInfoP, ); //
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
// Unlock the app info block.
MemPtrUnlock(appInfoP);
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/