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

trosession
delphi

(Stuart Clennett) #1

Hi,

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
begin
  V := roSession.Values[roSession.Names[L]];
  [...]
end;

Undeclared identifier 'Names’

Can you help please?

Thanks

(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;
..
{$I RemObjects.inc}
{$UNDEF ROUseGenerics}  //added

or undefine it in RemObjects.inc


(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?

Thanks


(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.

https://docs.remotingsdk.com/API/Delphi/Classes/TROSession/

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;
    {$ENDIF}

(RemObjects) #8

bugs://80885 got closed with status fixed.