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

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)

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

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

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

Thanks, logged as bugs://80885

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:

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}
1 Like

bugs://80885 got closed with status fixed.