类1
    Panel = Class(TPanel)
        public
            constructor Create(c:TComponent);
    End;
    implementation
    constructor Panel.Create(c:TComponent);
    begin
        inherited Create(c);
    end;类2
    PanelStep = Class(Panel)
        public
            constructor Create(c:TComponent);
    End;
    implementation
    constructor PanelStep.Create(c:TComponent);
    begin
        inherited Create(c);
    end;PanelStep 调用 Panel.Create 
总是报错!!!!????

解决方案 »

  1.   

    没加override;Panel = Class(TPanel) 
            public 
                constructor Create(c:TComponent);override; 
        End; 
        implementation 
        constructor Panel.Create(c:TComponent); 
        begin 
            inherited Create(c); 
        end; 
        PanelStep = Class(Panel) 
            public 
                constructor Create(c:TComponent); override;
        End; 
        implementation 
        constructor PanelStep.Create(c:TComponent); 
        begin 
            inherited Create(c); 
        end; 
      

  2.   

    没用一样报错~~~~constructor PanelStep.Create(c:TComponent); 
        begin 
            inherited Create(c); 
        end; 
     除非不要调用 inherited Create(c); 
      

  3.   

    inherited Create(nil);传入 nil 值就不会报错!!!!!真是怪了啊???????