The character pointer you pass using FldSEtTextPtr needs to be a pointer, not a constant text string. Plus, the pointer needs to remain in scope for the life of the field you wish alter. you could try (and I believe this is in the KB) 1) get the field pointer 2) get the size of the string you want to update the field with 3) get the field text handle 4) allocate memory or resize the handle if necessary 5) lock the handle 6) COPY the new string to the locked handle 7) unlock the handle 8) redraw the field
Some developers use the cut/paste functions to update fields A couple of articles that may help: http://oasis.palm.com/dev/kb/samples/1837.cfm http://oasis.palm.com/dev/kb/faq/1051.cfm http://oasis.palm.com/dev/kb/faq/1090.cfm Search the KB for more (plus code examples) ----- Original Message ----- From: "Nathan Peterson" <[EMAIL PROTECTED]> Newsgroups: palm-dev-forum To: "Palm Developer Forum" <[email protected]> Sent: Wednesday, October 04, 2000 2:57 AM Subject: FldSetTextPtr > I'm trying to update a field with text. The field is being drawn, but > no text shows up. Here's the code I'm using: > > form = FrmGetActiveForm(); > FrmDrawForm(form); > FldSetTextPtr(FrmGetObjectPtr(form,FrmGetObjectIndex(form,AboutField)),"test ing..."); > FldDawField (FrmGetObjectPtr(form,FrmGetObjectIndex(form,AboutField))); > > This is what I have in my .rcp file: > > FIELD ID AboutField AT ( 5 5 140 60) USABLE LEFTALIGN NONEDITABLE > MULTIPLELINES HASSCROLLBAR > > > -Nathan > > -- > For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/ > > -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/
