Suggestion: uRORemoteDataModule behaviour on GetEventRepository

Hi guys,

Working with some standarization of our code base we added a code that on creation of a ROremoteDataModule service checks if there is a SessionManager and/or EventRepository assigned to it.

The SessionManager property works well when is checked via

if Self.SessionManager=nil

or

if Assigned(Self.SessionManager)

But when working with the EventRepository, if there is no EventRepository assigned, any of the two options above will create an exception error.

It can be captured, but it creates some kind of “smelly code”, specially if you are checking for these assignments while creating your service, plus it doesnt aligned with the behaviour of the other properties.

Thank you once again.

Delphi Berlin, Latest RO/DA.

Thanks, logged as bugs://79504

pls update uRORemoteDataModule.pas as

property EventRepository : TROEventRepository read fEventRepository write SetEventRepository; //changed
...
function TRORemoteDataModule.GetEventsData(const ClientID: string; out EventsData: Binary): integer;
..
  result := GetEventRepository.GetEventData(Session.SessionID, EventsData); //changed

bugs://79504 got closed with status fixed.