Skip to content

Pseudo-abstrct metods of class TStringDictionary are not fully defined #6

Open
@vlad-mal

Description

@vlad-mal

Error detection:

uses
  flcDataStructs;
var
  fD : TStringDictionary;
  fStr: string;
begin
   fD := TStringDictionary.Create;
   fD['1234'] := '567';
   fStr := fD.AsString; // raised exception "Method TStringDictionary.GetItemStrByIndex not implemented"

Solution:

Solution:
It should be in the protected section of class AStringDictionary add overridden method:

type
  AStringDictionary = class(ADictionary)
  protected
...
    function  GetItemStrByIndex(const Idx: Integer): String; override; // Added 

with the implementation:

function AStringDictionary.GetItemStrByIndex(const Idx: Integer): String;
begin
  Result := GetItemByIndex(Idx);
end;
Regards, Malinovsky Vladimir.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions