Issues with indexed properties through the new RTTI [D2010]

  ShowMessage(TRttiContext.Create.GetType(TStringList)
    .GetProperty('Strings').ToString);

The above code does not work, since .GetProperty returns nil on properties such as "Strings", "Objects", "Values" (with indexers). I assume this is a known limitation, and the question is whether there is a way to access these indexed properties (preferably without reverting to the old RTTI utilities).

+3
source share
2 answers

RTTI, . , TStringList.FList RTTI. , , Count. .

+2

RTTI . - .

, ?;-) , , .

RTTI typ

procedure MyProc(const AParam: array of AType)

.

- , RTTI?

+1

Source: https://habr.com/ru/post/1722075/


All Articles