Robert Baruch wrote:
You really shouldn't have to do that. This is an implementation problem in your code, not a problem with some esoteric function that may or may not be broken in the OS. There are TONS of apps that handle lists with dynamic content. Off the top of my head, try this:You can't make the array const... otherwise you couldn't have lists whose content changes.
I also added LstSetHeight, but that failed to help.
I think I'm going to have to fork over $125 to Palm Support to get them to figure it out :(
Create a global list:
Char *days[7]={ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
Set up your list:
ListType *listP=GetObjectPointer(yourListID);
LstSetListChoices(listP, days, 7);
LstSetSelection(listP,3); //sets the initial selection as "Wednesday", just for kicks.
LstSetHeight(7);
Now draw the list: LstDrawList(listP);
Now, with the declaration of "days" above, it doesn't allow much room for dynamically changing the list. You can overwrite those strings (StrCopy(days[1],"Snd2"); for instance) but you are stuck with the string lengths that you initially set, or you will run into the other strings and overwrite your trailing NULL characters, both bad things. You could declare more inital space, or declare them as 32byte character arrays, or whatever you want.
Bob.
--Rob
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
