I'm trying to detect when a field has been changed. When I look at the
dirty flag after a single character is entered, the flag is set but FldDirty
returns false. If I use FldPtr->attr.dirty in an if statement, it is
resolved as if it were 0.
Why does CW debugger display the dirty bit as 1 but my code handles it as 0?
My code does work for the second character entered but not the first. Any
ideas?
Here's a little part of the code:
OurField = (FieldPtr) GetObjectPtr(MyField);
if(OurField->attr.dirty == 1)
{
// Do something
// This code only gets executed on the 2nd char entered in the field
}
or (which has the same effect)
OurField = (FieldPtr) GetObjectPtr(MyField);
if(FldDirty(OurField) == true)
{
// Do something
// This code only gets executed on the 2nd char entered in the field
}
The debugger clearly shows the dirty bit as 1 but it is being handled as 0
until at least 2 chars are entered.
Thanks for any insights
Dave