I cant use that method if I want to allow the user to click
on one of the lists entries
this is what im working on except i crash when it gets to this
LstDrawList( lsp1 );


 Char *letter[256];
        Char *p;
        Char **strArray = {""}; //empty array
        Char* strLines = NULL;
        Err err;
        
        StrCopy( letter, "A" );
        err = Open(); // routine to open database
    pForm = FrmGetActiveForm(); // get active form
        lsp1 = FrmGetObjectPtr(pForm, FrmGetObjectIndex(pForm, frmList1)); // 
get id of list control
        
        nRecordIndex = DmNumRecords(dbPtr); // number of records

        for(index =0; index < 10; index++) // lets index through database
         {
          h =DmQueryRecord(dbPtr, index); // lets query each record
          p = (Char *) MemHandleLock(h); // lets lock each record
      if( 0 == StrNCaselessCompare( letter, p, 1) )
           {
            ghStringArray = SysFormPointerArrayToStrings(p, 1);
            strArray = (Char**) MemHandleLock(ghStringArray);
           }
          MemHandleUnlock(h); // unlock each record 
         }
        LstSetListChoices(lsp1,strArray,index); // clear list
    LstDrawList( lsp1 );
        err = CloseDB(); 
        return true;
}

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

Reply via email to