I have some default text that I want written to the screen, then I
have two buttons, one to clear the screen and one to process the text
that is currently on the screen. I want to be able to clear the
screen and edit the text at any time and then press the process
button and have whatever text is there be passed to a function for
processing. I am having problems writing this correctly so that it
will allow me to change the text and grab the text without getting a
free handle error and would appreciate any source code examples. Thanks Monika Kauntz
To clear text: FldFreeMemory(); FldDrawField();
To get text from field to pass to your own function: your_function( FldGetTextPtr() );
FldGetTextPtr() returns a pointer to the fields locked handle that is automatically unlocked (and invalidated) when the field is edited or the form closed. You don't need to worry about freeing this pointer.
/* * Matt Graham * Palm OS Developer * www.healthramp.com */
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
