Jim Morris wrote:

> Did you try
> LstSetListChoices( listP, ( Char ** ) &(gGeodesics->datumNames),
> numDatums );

Yes, but LstSetListChoices expect an array of string pointers, whereas my 
struct is an array of unpacked strings. So studying it further, I realized I 
had to create an array of pointers, but I could not use 
SysFormPointerArrayToStrings since my struct is not packed. So instead I just 
found the right conversion a minute ago:

MemHandle gDatumNames = MemHandleNew( 4 * ( NumDatums + 1 ) );
Char **ptr = ( Char** ) MemHandleLock( gDatumNames );

for ( i = 0; i <= NumDatums; i++ )
    ptr[ i ] = ( Char * ) &( gGeodesics->datums[ i ].name );

MemHandleUnlock( gDatumNames );

So I can now call

LstSetListChoices( listP, ( Char ** ) MemHandleLock( gDatumNames ), numDatums );

and get the list lookup working :)


Luc Le Blanc
-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to