开发者

Delphi gone mad: Says TstringList.sorted is an "undeclared identifier"

开发者 https://www.devze.com 2023-01-04 05:09 出处:网络
My code is exactly like the example in the he开发者_开发百科lp file: myStrings := TStringList.Create;

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; 
0

精彩评论

暂无评论...
验证码 换一张
取 消