Menu

Form Storage

RxLib Bugs
ralfessed
2010-10-06
2013-04-06
  • ralfessed

    ralfessed - 2010-10-06

    Edit.text stored properties is not stored in a file after close and is not shown when program starts

     
  • ralfessed

    ralfessed - 2010-10-06

    fix in RXprop

    procedure TPropsStorage.LoadAnyProperty(PropInfo: PPropInfo);
    var
      S, Def: string;
    begin
      try
        if PropInfo <> nil then
        begin
          case PropInfo^.PropType^.Kind of
            tkInteger: Def := StoreIntegerProperty(PropInfo);
            tkChar: Def := StoreCharProperty(PropInfo);
            tkEnumeration: Def := StoreEnumProperty(PropInfo);
            tkFloat: Def := StoreFloatProperty(PropInfo);
            tkWChar: Def := StoreWCharProperty(PropInfo);
            tkLString: Def := StoreLStringProperty(PropInfo);
      {$IFNDEF RX_D3} { - Delphi 2.0, C++Builder 1.0 }
            tkLWString: Def := StoreLStringProperty(PropInfo);
      {$ENDIF}
            tkVariant: Def := StoreVariantProperty(PropInfo);
    {$IFDEF RX_D4}
            tkInt64: Def := StoreInt64Property(PropInfo);
    {$ENDIF}
            tkString: Def := StoreStringProperty(PropInfo);
            tkWString: Def := StoreStringProperty(PropInfo);
            tkSet: Def := StoreSetProperty(PropInfo);
            tkClass: Def := '';
        // toeveoging
            tkUString: Def := StoreLStringProperty(PropInfo);
          else
            Exit;
          end;
          if (Def <> '') or (PropInfo^.PropType^.Kind in )
            or (PropInfo^.PropType^.Kind in [tkLString, tkWString,
              {$IFNDEF RX_D3} tkLWString, {$ENDIF} tkWChar])
          then
            S := Trim(ReadString(Section, GetItemName(string(PropInfo^.Name)), Def))
          else
            S := '';
          case PropInfo^.PropType^.Kind of
            tkInteger: LoadIntegerProperty(S, PropInfo);
            tkChar: LoadCharProperty(S, PropInfo);
            tkEnumeration: LoadEnumProperty(S, PropInfo);
            tkFloat: LoadFloatProperty(S, PropInfo);
            tkWChar: LoadWCharProperty(S, PropInfo);
            tkLString: LoadLStringProperty(S, PropInfo);
      {$IFNDEF RX_D3} { - Delphi 2.0, C++Builder 1.0 }
            tkLWString: LoadLStringProperty(S, PropInfo);
      {$ENDIF}
            tkVariant: LoadVariantProperty(S, PropInfo);
    {$IFDEF RX_D4}
            tkInt64: LoadInt64Property(S, PropInfo);
    {$ENDIF}
            tkString: LoadStringProperty(S, PropInfo);
            tkWString: LoadStringProperty(S, PropInfo);
            tkSet: LoadSetProperty(S, PropInfo);
            tkClass: LoadClassProperty(S, PropInfo);
    // toeveoging
            tkUString:   LoadStringProperty(S, PropInfo);

          end;
        end;
      except
        { ignore any exception }
      end;
    end;

    procedure TPropsStorage.StoreAnyProperty(PropInfo: PPropInfo);
    var
      S: string;
    begin
      if PropInfo <> nil then
      begin
        case PropInfo^.PropType^.Kind of
          tkInteger: S := StoreIntegerProperty(PropInfo);
          tkChar: S := StoreCharProperty(PropInfo);
          tkEnumeration: S := StoreEnumProperty(PropInfo);
          tkFloat: S := StoreFloatProperty(PropInfo);
          tkLString: S := StoreLStringProperty(PropInfo);
      {$IFNDEF RX_D3} { - Delphi 2.0, C++Builder 1.0 }
          tkLWString: S := StoreLStringProperty(PropInfo);
      {$ENDIF}
          tkWChar: S := StoreWCharProperty(PropInfo);
          tkVariant: S := StoreVariantProperty(PropInfo);
    {$IFDEF RX_D4}
          tkInt64: S := StoreInt64Property(PropInfo);
    {$ENDIF}
          tkString: S := StoreStringProperty(PropInfo);
          tkWString: S := StoreStringProperty(PropInfo);
          tkSet: S := StoreSetProperty(PropInfo);
          tkClass: S := StoreClassProperty(PropInfo);
           tkUString: S := StoreStringProperty(PropInfo);
        else
          Exit;
        end;
        if (S <> '') or (PropInfo^.PropType^.Kind in [tkString, tkUstring,
          tkLString, tkWString, {$IFNDEF RX_D3} tkLWString, {$ENDIF}
          tkWChar]) then
          WriteString(Section, GetItemName(string(PropInfo^.Name)), Trim(S));
      end;
    end;

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.