Looking at the source code for Palm OS 1.0 through 4.1, it looks like
DmFindRecordByID just returns an error code without any fatal or non-fatal
alerts. I'm not sure why the docs say "May
display a fatal error message if the unique ID is invalid." Maybe I missed
something. Has anyone actually seen an alert when using this function? The
only alerts I can see are used in "but this can never happen" situations.

It appears that this is a documentation bug. I don't think we included that
note in the docs to allow us to add a fatal or non-fatal alert later. I
suspect the note is intended for another function, that did have a non-fatal
alert at one point.

Having DmFindRecordByID pass back dmMaxRecordIndex (0xFFFF) via the indexP
parameter when it returns the dmErrUniqueIDNotFound error code, is an
interesting idea. This record number is almost certainly illegal. It would
cause a subsequent call to DmQueryRecord to return zero. A subsequent call
to DmGetRecord would put up an alert on debug ROMs as well. In either case,
the zero would probably be passed into MemHandleLock, which would put up an
alert on release ROMs as well.
-
Danny

-- 
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