[fpc-pascal] 2.1.1 new protected

Graeme Geldenhuys graemeg.lists at gmail.com
Fri Aug 11 14:49:16 CEST 2006


On 8/11/06, Michael Van Canneyt <michael at freepascal.org> wrote:
> It seems normal to me that it is not just the current instance.  You KNOW this
> method is there, in a descendent, so it seems logical that you know that it
> exists for another instance as well.

Coming from a Delphi background, I disagree here.  As I understood the
Delphi docs, protected methods are only visible in the current
instance (decendant), and not instances passed in as parameters.

Reading the docs again, I am not sure what happens when both those
classes appear in the same unit.  This then becomes like the "friend"
classes used in C++ and C# and might be allowed in such a case...
Quite confusing... :-)

Here is a snippet of the Kylix 3 docs:

------------------------
... See attached image, I couldn't cut and paste from CLX....
------------------------

Regards,
  - Graeme -

-- 
There's no place like 127.0.0.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Delphi Language Reference.png
Type: image/png
Size: 10641 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20060811/ba097248/attachment.png>


More information about the fpc-pascal mailing list