ClassesLib: TStrings.Names[] invalid design declaration

Issue #180 resolved
Josef Kučera created an issue

Hello,
I have noticed that the Names[] property of the TStrings class has a String index instead of an Integer one (as I would expect and as the implementation expects). Compiling this script:

l:= TStringList.Create;
l.Names['bug'];

Works, but fails at runtime.

I have prepared a small fix with a minor enhancement included (adding ValueFromIndex[] property) and some new tests added (patch attached).

Best regards,
Joe

Comments (2)

  1. Log in to comment