"David A. Smith" wrote:
>
> 2) Does anyone have some sample code or a reference to sample code
> to do something like the following:
>
> build strings in a chunk of memory
> set an array of pointers into the pool of strings above
> call LstSetListChoices
Maybe something like this...?
static void UpdateTextsList(void) {
int i;
ListPtr lst;
char **items = (char **) MemPtrNew(TLPrefs.itemCount * (sizeof(char
*)));
if (!items) return;
for (i = 0; i < TLPrefs.itemCount; i++)
items[i] = TLPrefs.items[i];
lst = GetObjectPtr(listID_text);
LstSetListChoices(lst, items, TLPrefs.itemCount);
LstSetHeight(lst, TLPrefs.itemCount);
return;
}
Regards,
Daniel.