Jump to content
pyscripter

New Warning in 12.2: Overloading a similar index type by declaring an array property 'Items'

Recommended Posts

28 minutes ago, Uwe Raabe said:

IIRC, that has been Delphi 6 or 7. One can even test for that with {$IF CONDITIONALEXPRESSIONS}.

It was Delphi 6. (That's one of the reasons why GExperts dropped support for Delphi 5).

Share this post


Link to post
On 9/15/2024 at 12:47 PM, Angus Robertson said:

You still need   {$IF Declared(RTLVersion122)}  if you want the component to also work on 12.0 and 12.1.   And $IF is not supported on earlier compilers, if that matters.

 

Angus

 

Using {$IF (CompilerVersion >= 36)}TListSize = NativeInt;{$ELSE}TListSize = Integer;{$IFEND} is compatible also with 12.0 and 12.1, because in System.Classes property Items is already defined as [Index: NativeInt] (they missed to raise a warning in 12.0 and 12.1)

Edited by Carlo Barazzetta

Share this post


Link to post

The Project Options in the Delphi 12.2 IDE does not even support such option, does it? (I want to disable the warning in dproj files)

Share this post


Link to post
14 minutes ago, baoquan.zuo said:

The Project Options in the Delphi 12.2 IDE does not even support such option, does it? (I want to disable the warning in dproj files)

No.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×