on 8/24/01 11:37, Ryan Greene at [EMAIL PROTECTED] wrote:
> I am very new to palm programming, and most of it makes sense, but...
>
> I am getting fatal exceptions in my address book program.
>
> I list all the entries using DmQueryRecord. Then when a user selects an
> entry, I DmGetRecord, and display it in several fields. I then
> DmReleaseRecord when the user wants to stop editing the record (save or
> cancel).
>
> I want to be able to set a variable in the struct of the record that will
> indicate "my" entry (i.e. the record with my information). I want to clear
> that variable in all other records, and set it in the currently viewed
> entry.
>
> Should I just keep an index to know which record is "my" record, and save
> that somehow in the preferences? Or should I add a variable to the
> structure?
If you are just want to be able to get back to the same record, then try
saving the record ID (returned by DmRecordInfo). The index can change as
records are added/removed or a sort occurs.
> Currently, I am trying to get the ID from DmRecordInfo. It almost works...
> The DmRecordInfo calls are returning the correct information, but after it
> leaves the "GetMyCard" function, it has a fatal error. I have commented out
> the DmRecordInfo call, and it doesn't crash.
What is the nature of your crash?
-Tom Hoelscher
~~~~~~~~~~~~~~~~~~~~~~~~~~
"Original Sin is hard to find, but the digitally enhanced version is readily
available".
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/