Sorry, I already found the error, it was a copy paste issue. Thanks anyway "rua17" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello, > > I have a problem with the following code, I save the info in my DB > referenced by gDRecPot and in a method I display it on a list. I have other > dynamic lists and I have no problems no matter the number of records. in > this case after 5 records, the app crashes. > > Related Info > name CHAR[60] > lastName CHAR[60] > Records = 5 > > Function > > static void FillCtePotencialList(ListType *lst){ > > MemHandle h; > DBRecPotType *c; > Char **itemList; > char nombre[121]; > Int16 cantCtes,i; > cantCtes = DmNumRecords(gDRecPot); > itemList = (Char **) MemPtrNew(MAXPROM * sizeof(Char *)); > gCteListChoices = itemList; > gCteListNumItems = cantCtes; > > for (i=0; i<cantCtes;i++){ > h = DmQueryRecord(gDRecPot,i); > c = (DBRecPotType *)MemHandleLock(h); > StrCopy(name, c->name ); > StrCat(nombre, " "); > StrCat(nombre, c->lastName ); > TxtGlueTruncateString(nombre,131); > MemPtrUnlock(c); > itemList[i] = (char *) MemPtrNew(121); > StrPrintF(itemList[i],nombre); > } > LstSetListChoices(lst, itemList, cantCtes); > } > > > any ideas? > > > > >
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
