Here's some useful stuff for you:
[from a Palm header]
// SysCreateDataBaseList can generate a list of database.
typedef struct
{
Char name[dmDBNameLength];
ULong creator;
ULong type;
UInt version;
LocalID dbID;
UInt cardNo;
BitmapPtr iconP;
} SysDBListItemType;
[from one of my apps]
// set up DB list.
if ( SysCreateDataBaseList(sysFileTApplication, NULL, &dbCount,
&gP->dbList, true) ) {
gP->dbsP = MemHandleLock(gP->dbList);
gP->dbNames = MemPtrNew(sizeof(SysDBListItemType) * dbCount);
ErrFatalDisplayIf(!gP->dbNames, "Mem allocation failed in
tapDelete()");
for (i = 0; i < dbCount; i++) {
gP->dbNames[i] = &gP->dbsP[i].name[0]; // copy ptr to name
if (cDBName) {
if (StrCompare(gP->dbNames[i], cDBName) == 0)
sel = i;
}
}
listP = PrefsGetObjectPtr(PrefsAppsList);
LstSetListChoices(listP, gP->dbNames, dbCount);
LstSetSelection(listP, sel);
LstSetHeight (listP, dbCount);
if (sel != noListSelection)
LstMakeItemVisible (listP, sel);
}
else {
ErrDisplay("No db's installed. Impossible.");
}
Alan Pinstein
Synergy Solutions, Inc.
http://www.synsolutions.com
1-800-210-5293
> Any clue on how to use the IDs returned by SysCreateDataBaseList?
>
>*********** REPLY SEPARATOR ***********
>
>On 4/15/99 at 10:19 AM Alan Pinstein wrote:
>
>>You've got to set up your own structures to manage all of this plugin
>>information. I use one database per plugin. You've got to set up and API
>>for the plugin entry points, and manually grab CODE resources. lock them
>>down, and use that ptr as your API entry point. That's the gist of the
>>idea. YOu can lay on as much additional functionality as you like.
>>
>>
>>Alan Pinstein
>>Synergy Solutions, Inc.
>>http://www.synsolutions.com
>>1-800-210-5293
>>
>>
>>> I am wanting to create an application that uses plug-ins to allow
>>>users to have the functionality they want so that I do not have to create
>>>a huge application that does everything. Initially, these plug-ins will
>>>be listed in a text mode, but icons will eventually be supported. I
>>>thought of using hacks as a model and create resource code objects. I do
>>>not know, however, how to get the info out of the object (name, icon,
>>>etc). Anyone have some ideas? Pointers?
>>>
>>>thanks,
>>>bryon lape
>>>-------------------------------------------------------------
>>>Did you get your bonus check?, visit http://www.grey-net.com/
>
>
>-------------------------------------------------------------
>Did you get your bonus check?, visit http://www.grey-net.com/