Hello,
I spoke too soon my previous post. In another project, somewhat more complex, I’m getting a compiling error with the generated _Intf unit. I’m trying the gamma version 9.2.102.1293.
The problem occurs inside a ReadComplex method, in a structure inherited from another one that includes a third structure: I have an Address structure, then a Customer structure (which includes an Address structure) and a ExtendedCustomer inherited from Customer.
The error happens in the ReadComplex method of ExtendedCustomer, as the fAddress pointer is private to Customer, so the FreeAndNil fails with a compiler error E2247 “TCustomer::fAddress is not accesible”.
Here is the exact code:
l_Direccion = this->int_Direccion;
try
{
__Serializer->ReadStruct("Direccion", __classid(msaCI1ClientInterface::TDireccion), &l_Direccion);
}
catch (Exception* E)
{
Uroclasses::RaiseError("Exception \"%s\" with message \"%s\" happens during reading field \"%s\".", ARRAYOFCONST((E->ClassName(), E->Message, "Direccion")));
}
if (this->int_Direccion != l_Direccion)
FreeAndNil(this->fDireccion); // <-- this is the offending line.
this->Direccion = l_Direccion;
I checked the Delphi code and as far as I can see (without trying to compile it) it produces something equivalent (the member is Private) but I don’t remember if the rules in Delphi are different regarding this.
Any recommendations to fix this? Hopefully you can get a fix for this for the RTM build.
Thanks