[lazarus] designer.inc file error

Michael A. Hess mhess at miraclec.com
Thu Mar 23 02:12:58 EST 2000


Marc Weustink wrote:
> 
> This is code which compiles under D4 ! (if you want an example I'll
> give one)

I give up. I must admit you are correct. Not believing it myself I wrote
a test program in Delphi 4 and by god you are correct. To me that
doesn't comply with the definition of private, protected and published
but it does work and the current code in TDesigner should be OK if it is
to be Delphi compatible. My investigation found the following:

Private - Visible in the unit declared by any class or method found in
          that unit.

Protected - Same as Private plus. It is visible by any class or method
            in other units if a class in that unit is a descendent of
            the original class. In other words if a class in a given
            unit is a descendent of a class in another unit then all of
            the protected members of the original class are now visible
            in this descendents unit.

public - Visible anywhere by anybody.

Since TDesigner is defined in the same unit "Forms" as TCustomForm which
is a descendent of TControl then all public and protected members should
be visible within the "Forms" unit. If TDesigner was defined in a
different unit then TCustomForm then only the public members would be
available to TDesigner.

So FPC guys it appears that the current private, protected, public
layout matches the documentations definition but it doesn't match the
current operation of Delphi.

Sorry about giving you a hard time Marc. I truly believed what the
Delphi documentation said and I have always coded that way and had never
even attempted to do what TDesigner did because I just thought you
couldn't.

-- 
==== Programming my first best destiny! ====

Michael A. Hess      Miracle Concepts, Inc.
mhess at miraclec.com   http://www.miraclec.com






More information about the Lazarus mailing list