Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > OOP
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 08-02-2006
modulay modulay is offline
Miembro
 
Registrado: feb 2006
Posts: 46
Poder: 0
modulay Va por buen camino
Unhappy constructor...propiedad heredada

Pues tengo definido un constructor para una clase que hereda de TPanel,y al intentar inicializar alguna de las propiedades heredadas me da error

Código Delphi [-]

unit Tbarco;

interface

uses
  Types, ExtCtrls, Classes, Controls;

type
  Tbarco1 = class(TPanel)
private
  dim : integer;
  vert : boolean;
  pro,pop : TPoint;
public
  property dimension : integer read dim write dim;
  property vertical : boolean read vert write vert;
  property proa : TPoint read pro write pro;
  property popa : TPoint read pop write pop;
  constructor crear(dimens,x,y,ancho,alto : integer);
end;


implementation

  constructor Tbarco1.crear(dimens,x,y,ancho,alto : integer);
  begin
    self.vert := false;
    self.dim := dimens;
    self.caption := '';   // propiedad de TPanel
    self.pro := Point(0,0);
    self.pop := Point(0,0);
  end;

end.

La llamada al constructor...

Código Delphi [-]

b := Tbarco1.crear(2,2,2,2,2);

¿es que no se puede hacer ó es q lo estoy haciendo mal?
Gracias
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro


La franja horaria es GMT +2. Ahora son las 09:00:15.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi