I'm having a real problem with text fields that contain formated numeric
data and I hope someone can help me.
I have several text fields that are all defined with:
Usable
Editable
Underline
Single Line
all checked and all the others unchecked.
I allow the user to enter numeric data and a single decimal point. When the
user switches to another field I get the data from the text field
(FldGetTextPtr) and format it to the correct characters after the decimal
and add commas to the characters to the left of the field. I then set the
formated string as the new text field. I use the functions right out of the
'Palm Programming - The Developers Guide' by Rhodes & McKeehan (pages117
thru 120) including freeing the old text memory - RIGHT OUT OF THE BOOK.
The problem is that I get an 'Invalid field length' message when I execute
the 'oldTxtH = FldGetTextHandle(fldP)' instruction. It turns out that the
text in the field has the commas eliminated (not by me) and so a field of
'1,234' now is set to '1234' but the field length is set to 5, and therefore
the Invalid field length. Also it is interesting to find the numeric
parameter is true (fldP->attr.numeric == 1).
This one has really got me stumped. And email to Palm support is down.
Help. Anyone?
Bruce Hartwig
Rivendell Development Corp
--
For information on using the ACCESS Developer Forums, or to unsubscribe, please
see http://www.access-company.com/developers/forums/