TROSession.Names = undeclared identifier "Names" in RO/DA


(Stuart Clennett) #1


Just upgraded to RO 9.4.109/1377 and now the compiler is complaining about the following line:

roSession := SessionManager.FindSession( StringToGUID( SL[I] ), TRUE);
for L := 0 to roSession.Count-1 do
  V := roSession.Values[roSession.Names[L]];

Undeclared identifier 'Names’

Can you help please?


(Using Delphi 10.1 Berlin)

(EvgenyK) #2

You can use TROSession.Keys property for enumerating names.
this change was made in favor of NextGen compiler.

by other hand, if you want to use old behavior, you can undefine ROUseGenerics in this unit like

unit uROSessions;
{$UNDEF ROUseGenerics}  //added

or undefine it in

(Stuart Clennett) #3

Hi Evgeny,

Great thanks, should’ve spotted the Keys property.

Is there anywhere on the RO site & documentation that lists breaking changes like this?


(EvgenyK) #4

at this moment, we have not such list.
I’ll create it at new documentation site

(RemObjects) #5

Thanks, logged as bugs://80885

(Stuart Clennett) #6

Also, your documentation is out of date.

It still mentions the Names property.

Thanks guys :slight_smile:

(EvgenyK) #7

if you saw sources, you can see that Names property is still here, but it is put into conditional block:

  TROSession = class
    {$IFNDEF ROUseGenerics}
    property Names[Index : integer] : string read GetNames write SetNames;

(RemObjects) #8

bugs://80885 got closed with status fixed.