It seems that the following code:
static void MyFunc()
{
UInt16 objIndex;
FieldPtr fldptrAmount;
char *amount;
frm = FrmGetActiveForm();
// Get user's amount input
objIndex = FrmGetObjectIndex(frm, fldAmount);
fldptrAmount = FrmGetObjectPtr(frm, objIndex);
FormatAmount(fldptrAmount, MaxDecimalPlaces);
amount = FldGetTextPtr(fldptrAmount);
...
}
...is giving me a problem only in FormatAmount() if fldAmount doesn't
contain any data. The first few lines are where POSE is telling me that
I'm reading from low memory:
static void FormatAmount (FieldPtr fld, UInt16 decimalPlaces)
{
Int16 len;
Char * str;
str = FldGetTextPtr (fld);
len = StrLen (str);
if (!len) return;
...
}
But as I mentioned, if the field contains data, POSE executes this
normally.
I don't think it's a POSE problem, that's why I'm posting here -- I
think it's a general problem with the way I've coded this...
Thanks for any help in advance,
--Bill
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/