Delphi gone mad: Says TstringList.sorted is an "undeclared identifier"
My code is exactly like the example in the he开发者_开发百科lp file:
myStrings := TStringList.Create;
myStrings.Sorted := True;
myStrings.Duplicates := dupIgnore;
The compiler tells me that both sorted
and Duplicates
are undeclared identifiers.
But, how can that be if it correctly reconizes the TStringList.Create
? I have not redifined stringList classes any where else. It is a simple testing stub that has the absolute minimum components in order to test a specific tecnique... uses Classes, Windows and Dialogs
--in that order.
I think that myString is declared as TStrings
var myStrings: TStrings; //From second Comment
Declare that as TStringList
var myStrings: TStringList;
精彩评论