> How do I iterate over all records in a resource database?

Resource databases contain resources, not records.

>    for (i=DmNumResources(resDB)-1; i>=0; i--) {
>        handle = DmGetResourceIndex(resDB, i);
>       // do something
>       DmReleaseResource(handle);
>    }

Looks fine, but it doesn't do anything. DmReleaseResource is currently a
no-op.

> I want to close all open records to avoid debug ROM warnings. I don't
> know which record is locked because my app quits abruptly with a long
> jump ..... it's ugly.

You're treating the symptom rather than the disease. The debug ROM warnings
are there to help you find bugs in your code. They're not there to make you
add work-around code to your app. You probably need to add some additional
state to your application so that you can recover cleanly from whatever's
causing this long jump.

What exactly is the debug ROM complaining about? You're releasing records
but you say the warning is about a locked (not busy) record (not resource).
--
Danny @ Palm

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

Reply via email to