I'm talking from a strong Delphi point of view. Maybe FPC has such
features. I'll have to check all that. But my theory was
public->private possible but private->public impossible. Maybe the
protected mode (which is half private) has some exceptions.

I would not want to give false information. I'll refresh my theory
when I've the time to check this issue.

Best regards.

2006/6/10, Gabor Boros <[EMAIL PROTECTED]>:
Hi Alexandre!

I quoted the FPC's Reference because I think Felipe is wrong. You
understood this.
But now I'm completely confused.

Alexandre Leclerc írta:

 > When you "subclass" you can reimplement any "level of visibility" of
 > the ancestor class and also change this "level of visibility", but
 > only downward (more private, never mor public).

1. case:
Txxx = class(TObject)
   private
     procedure Method_1(Value:Integer); virtual;
   end;

   Tzzz = class(Txxx)
   protected
     procedure Method_1(Value:Integer); override;
   end;

2. case:
Txxx = class(TObject)
   protected
     procedure Method_1(Value:Integer); virtual;
   end;

   Tzzz = class(Txxx)
   private
     procedure Method_1(Value:Integer); override;
   end;

The 1. and the 2. case is working too. This is not problem for me, just
after you wrote this is not workable. Sorry if I misunderstood your reply.

Gabor

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives



--
Alexandre Leclerc

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to