> >form = FrmGetActiveForm();
> >fld = FrmGetObjectPtr(form, FrmGetObjectIndex(form, FIDsign));
> >FldSetFont(fld, fontBold);
> >
> >Any idea why the writing to low memory complaint is appearing?
> 
> Have you tried stepping through with the debugger, to see if "form" or
> "fld" are null? Perhaps the form isn't yet loaded, or something else is
> going on which can't be seen from this snippet.

The fld pointer is valid. In the debugger, just before executing the 
FldSetFont call, I look at the field object. All the elements appear to 
be fine; in particular, the "font" element has the value "fontStd".

If I call FldSetFont with "fontStd" as the second argument, no warning 
occurs. This is expected: a quick look at the FldSetFont source shows 
that it returns immediately if the new font is the same as the present 
font (i.e. there's nothing to do).

Here's another data point: if I define the field with insufficient 
height to handle the font I want to use, I get a bus error right after 
the "write to low memory" warning. E.g. if I define the field to be 11 
pixels high, and I try to set the field to fontLarge (which is 15 
pixels high).

--
Roger Chaplin
<[EMAIL PROTECTED]>

Reply via email to