[fpc-devel]TReader.ReadPropValue

Darek Mazur darekm at emadar.com
Fri Dec 5 19:06:12 CET 2003


I've try to discover why LRS don't work with TColor, and I think I found:

in ReadPropValue for enumeration identifier can't be a VALUE

this is my proposition to solve:

    tkEnumeration:
      begin
        Value := GetEnumValue(PropType, ReadIdent);
        if value = -1 then begin
          IdentToIntFn := FindIdentToInt(PPropInfo(PropInfo)^.PropType);
          Ident := ReadIdent;
          if Assigned(IdentToIntFn) then IdentToIntFn(Ident, Value);
        end;

        if Value = -1 then
          raise EReadError.Create(SInvalidPropertyValue);
        SetOrdProp(Instance, PropInfo, Value);
      end;


Darek





More information about the fpc-devel mailing list