I have a field that I want to be left justified. As data is
entered, to the point where it approaches the right side of the
field, I would like to change the justification to right justified.
I thought I could just:
1) FldGetAttributes
2) check field text width
3) when the width is greater than some value
change justification, then
4) FldSetAttributes
But here is the problem. I have an app that passes the 1Million
Gremlin test. It works well. I just inserted two lines after
the EventHandler for the form, right after the case test for
a key press. But when I put these lines in the app, it crashes
in POSE with a bus error.
// fldP is declared as FieldPtr
// attrP is declared as FieldAttrPtr
// fldXReg is ID of field
// form is obtained with GetActiveForm()
case ctlSelectEvent:
fldP = FrmGetObjectPtr(form, FrmGetObjectIndex(form, fldXReg));
FldGetAttributes(fldP, attrP);
Why would these two lines produce the error? If I comment them
out, the app works flawlessly.
Mike
--
-----------------------------------------------------------------
Discussion Group: http://www.halcyon.com/ipscone/wwwboard/
Protect your constitutional rights. Your favorite one may be next!
-----------------------------------------------------------------