> From: Michael Morton
[code snipped]
The big problem I see with your LoadList function is that you delete the
list elements after calling LstSetListChoices(pList,pAccList,recCount);
LstSetListChoices expects pAccList, and all of the strings the pointers in
pAccList point to, to exist for the life of the list. So your LoadList
function is not properly initializing a list.
Also, I noticed that you create a local variable, listItems, and attempt to
return a pointer to that stack-based variable as the result of your function
call. After you exit the function, the stack contents are very likely to
change, so this won't work.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/