--- Jeremy Bradshaw <[EMAIL PROTECTED]> wrote:
>
> I narrowed the problem down to a function that toggles the
> underlined state of a field. If I remark out the call to
> that function, everything works fine. Here's the code...
>
> void ToggleFieldUnderline(FieldPtr pField, Boolean bState)
> {
> FieldAttrPtr attrs;
>
> FldGetAttributes(pField, attrs);
> attrs->underlined = bState;
> FldSetAttributes(pField, attrs);
> FldDrawField(field);
> }
>
> Am I doing something wrong in this function? The function
> itself works fine but...
I am rather surprised that you can even compile this function. Did you
copy and paste it, or is it the result of typing in to your email
program?
Some problems:
-- 'attrs' is declared but not defined before it is used
-- 'field' is undefined (you probably meant pField)
Try this code, and see if it causes the same problem:
static void ToggleFieldUnderline(FieldPtr pField, Boolean bState)
{
FieldAttrType attrs;
FldGetAttributes(pField, &attrs);
attrs.underlined = bState;
FldSetAttributes(pField, &attrs);
FldDrawField(pField);
}
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/