Howdy,
Writing my second palm application. The first was helloworld out of "Palm
OS Programming Bible". I am using FreeBSD 4.3 with MathLib, prc-tools 2.0
and pose 3.2.
In this application I numerous numeric fields displaying floating point
values. I would like to grab those string values when various buttons are
pressed and convert them to double values. To do this I am using
FlpAToF(). Unfortunately, all I ever get is zero.
The code gets the active form, gets the field, gets a MemHandle with
FldGetTextHandle() then locks it with MemHandleLock(). At first I tried to
call FlpAToF() using the MemPtr returned by MemHandleLock(), but that seems
to cause the application to access memory it shouldn't. Next I created a
stack based local buffer and StrCopy()'d the string into that buffer before
calling FlpAToF(). No more memory access problems, but FlpAToF() just
returns zero. The string in the buffer is good, "1.2", but when I look at
the d field in the FlpCompDouble struct is zero.
What am I doing wrong? Should I be using some other function instead of
FlpAToF()? Is there some step I'm missing before I call FlpAToF()?
Thanks.
--
phil
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/