Delphi Compiler Error
W1045 Property declaration references ancestor private ‘%s.%s’
Reason for the Error & Solution
This warning indicates that your code is not portable to C++. This is important for component writers who plan to distribute custom components.
In the Delphi language, you can declare a base class with a private member, and a child class in the same unit can refer to the private member. In C++, this construction is not permitted. To fix it, change the child to refer to either a protected member of the base class or a protected member of the child class.
Following is an example of code that would cause this error:
type TBase = class(…) private FFoo:Integer end; TChild=class(TBase) published property foo:Integer read FFoo write FFoo; end;