I have two forms that each have a field that is filled,
character-by-character. Both forms fill the field exactly
the same way. After each character is inserted into the
field, a call is made to this function:
void AdjustFieldFont(Word fldID, int width) {
FormPtr form;
FieldPtr fldP;
form = FrmGetActiveForm();
fldP = FrmGetObjectPtr(form, FrmGetObjectIndex(form, fldID));
if(FldGetTextLength(fldP)>width) {
FldSetFont(fldP, stdFont);
}
else {
FldSetFont(fldP, largeFont);
}
}
My problem is that as data is entered into the fields, on
Form1, I get an error (with POSE) when the font is set to stdFont,
in the above routine. Entering characters into the other field,
on Form2, NEVER gives the error (with POSE).
The only difference between the fields is that one is multi-line,
with no underline (this one works) and the other field is single-line
and has an underline. Otherwise both fields are identical.
What can cause the error: "app has just read from memory location
zero, NULL" when changing font size. Both fields have characters
inserted from global arrays of characters.
--
-----------------------------------------------------------------
Discussion Group: http://www.halcyon.com/ipscone/wwwboard/
Protect your constitutional rights. Your favorite one may be next!
-----------------------------------------------------------------