OK, second random thought. You clearly are describing one more memory location (and copy) than you need. That is, when you do the DmNewRecord, that reserves memory (and returns a handle to it), you can than MemHandleLock it and copy your field stuff (with DmWrite or DmStrCopy, or...) to it without the need for an intermediate structure at all.
A third random thought. Are you carefully calling MemHandleUnlock on your new records after filling them? And also calling DmReleaseRecord to clear their busy bits? -----Original Message----- From: Kathleen Aiello [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 10:53 AM To: Palm Developer Forum Subject: Re: Reading from a Field The main form list loops through all records before display, and predictably lists the "blankname" strings interspersed with the blanks for the records for which I entered text. Thanks, Kathleen > Just a random thought here. DmNewRecord creates a new record and, possibly, > changes the location (indexes) of existing records. Perhaps your main form > is looking at the wrong record? > > -bob mckenzie, palmsource pdx > > I create a record using DmNewRecord, read in a form field with > FldGetTextPtr, create a structure, copy the name field to the > structure, and save it to my new record location using DmWrite. When > this form closes and the main form list displays the record names, > the name field is only displayed if it was left blank (which I >hardcoded to show up as "blankname"). If text was actually read from the >field, a blank is displayed in the list. The CodeWarrior Debugger says that > the name variable contains only '\0' (end of string) whenever actual > text was read in. Any ideas on why my field is not saved and > displayed in the list, but the hardcoded text is? > > Thanks, > Kathleen -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
