I have no idea what the heck is going on here.
I'm new so forgive me if this is a stupid problem. I'm currently writing my
first Palm OS app with CW6. Its over 2500 lines already and havent had too
much trouble learning the new OS. But this problem is so stupid, I cant see
whats wrong.
What I want to do is retreive the text in a list.
void MyFunction()
{
Word HitButton;
Word indx;
ListPtr list;
FormPtr frm;
char* tmp ;
frm = FrmGetActiveForm();
list =
(ListPtr)FrmGetObjectPtr(frm,FrmGetObjectIndex(frm,ViewLogsDBListList));
indx = LstGetSelection (list);
tmp = LstGetSelectionText (list, indx); // return pointer to text in
list
HitButton = FrmCustomAlert(LogDeleteAlert, tmp, NULL , NULL);
}
I get a "app read from low memory" error when it gets to the
"LstGetSelectionText" line. "List" is a valid ListPtr and "indx" = the
index of the item in the list.
Another questions is why in all the examples I never see FrmGetObjectPtr, or
other functions that return void pointers, needing to be typecasted to the
type of the pointer that is being set? But if I do that I get a "cannot
convert void* to [insert type here]*" error when I compile?
Thanks!
-Mike
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/