Ver Mensaje Individual
  #2  
Antiguo 05-11-2005
Avatar de Lepe
[Lepe] Lepe is offline
Miembro Premium
 
Registrado: may 2003
Posts: 7.424
Reputación: 29
Lepe Va por buen camino
Código Delphi [-]
type
   TXmlComoIni = class(TComponent)
   private
     FRaizXml: string;
     FFileName: TFileName;
     {...}
   public
     constructor Create(AOwner: TComponent);reintroduce; overload;

     constructor Create(AOwner: TComponent; const raizXml: string;
       const xmlPath: TFileName); reintroduce;overload;
   end;
implementation
 resourcestring
   rsExtXml  = '.xml';
   rsRaizXml = 'Opciones';
 
 { TXmlComoIni }
 
 constructor TXmlComoIni.Create(AOwner: TComponent);
 begin
   inherited;
   FraizXml := emptystr;
   Ffilename := emptyStr;

 end;
 
 constructor TXmlComoIni.Create(AOwner: TComponent;
   const raizXml: string; const xmlPath: TFileName);
 begin
 // esto no se hacía cuando el usuario llama directamente
// a este constructor:
  Inherited  Create(AOwner);

   if (raizXml<>EmptyStr) then
     FRaizXml := raizXml
   else
     FRaizXml := rsRaizXml;
   if (xmlPath<>EmptyStr) then
     FFileName := xmlPath
   else
     FFileName := ChangeFileExt
       (ParamStr(0), rsExtXml);
   AbrirDocXml;
 end;
__________________
Si usted entendió mi comentario, contácteme y gustosamente,
se lo volveré a explicar hasta que no lo entienda, Gracias.
Responder Con Cita