as they say, RTFM. :-) the docs (even 1.0 docs) say the first parameter is
"newSearch". pass true when you want to start a search, or false if you are
continuing a search. older versions of the OS ignored the parameter, but
that was a bug. it now works correctly (and if you call it correctly, it
does work on all versions of the OS).
----- Original Message -----
From: Joseph J. Strout <[EMAIL PROTECTED]>
To: Palm Developers Forum List <[EMAIL PROTECTED]>
Sent: Wednesday, September 29, 1999 8:32 AM
Subject: trouble finding all my files
> 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 |
> `------------------------------------------------------------------'
>