My guess is that your ReadRecord was returning NULL. The code I suggested doesn't change that fact, but does prevent you trying to use that NULL.
Glad it helped! Kevin -----Original Message----- From: Low Pui Kuen [mailto:[EMAIL PROTECTED]] Sent: Friday, March 15, 2002 10:55 AM To: Palm Developer Forum Subject: RE: Null string happened on real palm but 'ok' in emulator >From: "Kevin OKeefe" <[EMAIL PROTECTED]> >Reply-To: "Palm Developer Forum" <[EMAIL PROTECTED]> >To: "Palm Developer Forum" <[EMAIL PROTECTED]> >Subject: RE: Null string happened on real palm but 'ok' in emulator >Date: Fri, 15 Mar 2002 12:16:32 -0500 > >That error could be StrLen complaining or StrCopy complaining. > >I would separate out your compound phrase in the MemPtrNew call to >something like: > >Char* rec = ReadRecord(className, i); >if(rec) >{ > len = StrLen(rec) + 1; > cL[i] = MemPtrNew(len); > if(cL[i]) > StrCopy(cL[i], rec) >} >... > >IMHO, this code makes it much more clear what is giving you the problem. > >Kevin > Really thanx alot, it works!!! :) _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ ------------------------------------------ All information contained within or attached to this email transmission is Confidential. ------------------------------------------ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
