Here's your code modified so it works (I tried it). Be careful with the use
of SysFormPointerArrayToStrings. In the way you define your functions,
they're already in the format of an array of pointers, not a concatenation
of null-terminated strings (although in memory this may in fact be the
case).
--
Tim Kostka
FormPtr frmP;
Char *c[5] = {"one","two","three","four","five"};
Int16 stringCount = 5;
ListType* list;
frmP = FrmGetActiveForm();
if( LstNewList((void**)&frmP,1,50,30,50,50,stdFont,3,2) == 0)
{
list = (ListType*)FrmGetObjectPtr(frmP, FrmGetObjectIndex(frmP, (UInt16)
1));
// memList = SysFormPointerArrayToStrings((Char *)c,stringCount);
// memP = (MemPtr*)MemHandleLock(memList);
LstSetListChoices(list, c, stringCount);
LstPopupList(list);
//err = MemPtrUnlock(memP);
// error = MemHandleUnlock(memList);
// MemHandleFree(memList);
}
"salil khanwalkar" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
> I want to create a dynamic popup list when the user taps on a text field.
> Then show that list ,extract the selected value and display it in the text
> field.
>
> This is my code for creating a dynamic list...
> UInt16 trgID = 10;
> LstNewList((void**)FrmProductMasterForm,1603,10,10,50,50,3,stdFont,trgID);
>
> 1603 is the resource ID of a list that i created using the constructor.
>
> I get the following error..
> Error : illegal implicit conversion from 'int' to
> 'fontID'
> Starter.cpp line 873
> LstNewList((void**)FrmProductMasterForm,1603,10,10,50,50,3,stdFont,trgID);
>
> What am i doing wrong.
>
> Thanks and regards,
> Salil.
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/