My Lemons app needs to search for all installed "boards" (files) with
the same creator. This works fine on the Palm III, but on the IIIx
and the V, sometimes users find that it will show only the first
board.
The code I'm using to find the boards is as follows...
DmSearchStateType state;
UInt cardNo;
LocalID id;
Err err = DmGetNextDatabaseByTypeCreator(true,&state,kDbType,
kDbCreator, false, &cardNo, &id);
while (!err) {
LemonDbInfo *info = new LemonDbInfo;
info->mCardNo = cardNo;
info->mLocalID = id;
DmDatabaseInfo(cardNo,id, info->mName, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL ); // my, how C sucks!
DmOpenRef db = DmOpenDatabase(cardNo, id, dmModeReadOnly);
// ... (get some info from the db) ...
DmCloseDatabase(db);
mBoards.push_back(info);
err = DmGetNextDatabaseByTypeCreator(false,&state,kDbType,
kDbCreator, false, &cardNo, &id);
}
As you can see, it amounts to a simple DmGetNextDatabaseByTypeCreator
loop. I can't see how this could go wrong... but maybe there's some
trick I'm missing? Could this have to do with multiple cards?
Anybody else ever see a problem like this? I am completely at a
loss, so any help will be greatly appreciated!
Many Thanks,
-- Joe
,------------------------------------------------------------------.
| Joseph J. Strout Biocomputing -- The Salk Institute |
| [EMAIL PROTECTED] http://www.strout.net |
`------------------------------------------------------------------'