> Whenever I select a
>medication then tap "Delete" I get an error about reading from low memory.
The first question is: where does the error occur? You need to use
the symbolic debugger to answer that.
>Also, since I can't get the above to work yet. I was wondering if any one
>could comment on my function to return the record number of the database
>record choosen from my list. Does it look like it will work?
If your database is in the same order that you display it in the
list, you should be able to use the selection from
selection = LstGetSelection (listP);
to do a record lookup without any other lookup complications around.
If it's not, why not?
Finally, in your code, you don't check for any errors at all. For instance,
listP = GetObjectPtr(DeleteEditListList);
What if listP is NULL?
selection = LstGetSelection (listP);
What if selection is -1, meaning there is no selection?
recordHdl = DmQueryNextInCategory (gDataBase, &recordNum, theCategory);
What if recordHdl is NULL?
packedDrug = MemHandleLock (recordHdl);
What if packedDrug is NULL?
Hope that helps point you in the right direction.
Regards,
Steve Mann
--
-------------------------------------------
Creative Digital Publishing Inc.
1315 Palm Street, San Luis Obispo, CA 93401-3117
-------------------------------------------
805.784.9461 805.784.9462 (fax)
[EMAIL PROTECTED] http://www.cdpubs.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/