Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vlad-mal opened this issue Sep 6, 2016 · 0 comments

Comments

@vlad-mal
Copy link

vlad-mal commented Sep 6, 2016

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant