Hi all,
I am trying to execute some code which points to some text in a field (inputted by the user). I call the function below three times in succession. Now, when I run this program through the debugger, the first time this function is called, it goes through without any errors. When the function is called the second time, the program breaks and the following error occurs at the starred line:
'memorymgr.c, Line:3706, Invalid handle'
Does anybody know why this might be? I assume I am not freeing the memory chunk properly or something. Any ideas on how to fix the problem?
When you use FldSetTextHandle, you're passing control of the handle over to the field. In this code, you free the handle almost immediately after giving it to the field, something that's invalid -- the handle has to stay around until the field is changed to use another handle or until the form is closed.
-- Ben Combee, DTS technical lead, PalmSource, Inc. "Combee on Palm OS" weblog: http://palmos.combee.net/ Palm OS Dev Fourm Archives: http://news.palmos.com/read/all_forums/
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
