I am trying to set the choices in a list using LstSetListChoices, and know I
am getting very close to getting it to work.

I call my function to populate the list and I receive no error and I get no
data displayed in my list.

Here is the function.

static char* gPlateString =
"PL3/16x\0PL1/4x\0PL5/16x\0PL3/8x\0PL1/2x\0PL5/8x\0";
static char** gListString;
MemHandle gStringH;

static Boolean PopulateList(FormType* frmP, ListType* lstP)
{
    gStringH = SysFormPointerArrayToStrings(gPlateString, 6);
    gListString = (char**)MemHandleLock(gStringH);

    LstSetListChoices(lstP, gListString, 6);
    MemHandleUnlock(gStringH);

    return true;
}

...

case frmCloseEvent:
    MemHandleFree(gStringH);
    break;

I have also tried:

static char* gPlateString[6] = {"PL3/16x", "PL1/4x", "PL5/16x", "PL3/8x",
"PL1/2x", "PL5/8x"};

static Boolean PopulateList(FormType* frmP, ListType* lstP)
{
    LstSetListChoices(lstP, &gPlateString[0], 6);
    LstDrawList(lstP);

    return true;
}

Please help, everything I read on this function tells me to do exactly what
I am doing, and it is not working.  I know this shouldn't be that hard and
maybe i'm missing something simple.

tia,

Steve



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to