rgomezc
(Rodrigo Gómez)
June 11, 2019, 4:09pm
1
Hello,
I’ve just installed version 9.7 on my environment and I find that I can’t compile my projects with it.
The problem appears to be a change for the TROAsyncCallback type. Before (version 9.5 was the latest I had installed) it it was generated like this:
typedef void __fastcall (__closure *TROAsyncCallback)(const _di_IROAsyncRequest aRequest);
but now it is an abstract class/interface:
__interface TROAsyncCallback : public System::IInterface
{
virtual void __fastcall Invoke(const _di_IROAsyncRequest aRequest) = 0 ;
};
The problem is that the _Intf
files include, for instance, this:
virtual Uroasync::_di_IROAsyncRequest __fastcall BeginLoggedIn(const TROAsyncCallback aCallback, const void* aUserData = NULL) = 0;
which can’t be compiled as now TROAsyncCallback is an abstract class, so it is not possible to create an instance.
I’m using RAD Studio 10.1 Berlin.
Thanks!
EvgenyK
(Evgeny Karpov)
June 12, 2019, 9:29am
2
Hi,
weird, it wasn’t declared as abstract class or interface:
{$IFDEF TROAsyncCallback_as_reqular_method}
TROAsyncCallback = procedure (const aRequest: IROAsyncRequest) of object;
{$ELSE}
TROAsyncCallback = {$IFDEF DELPHI2009UP}reference to{$ENDIF} procedure (const aRequest: IROAsyncRequest);
{$ENDIF}
workaround: try to uncomment {.$DEFINE TROAsyncCallback_as_reqular_method}
in RemObjects.inc
, rebuild packages and retest.
Edit : another workaround: manually change TROAsyncCallback
with _di_TROAsyncCallback
in _Intf
file
Thanks, logged as bugs://82773
bugs://82773 got closed with status fixed.
rgomezc
(Rodrigo Gómez)
June 12, 2019, 2:45pm
5
Ok, I will try ASAP. I had to revert to the previous version.
I see that the bug was already fixed. What was the fix? I’m guessing changing it to _di_TROAsyncCallback
?
EvgenyK
(Evgeny Karpov)
June 12, 2019, 2:47pm
6
Hi,
yes, codegen now generates _Intf with _di_TROAsyncCallback
for C++Builder.