Ver Mensaje Individual
  #1  
Antiguo 24-02-2005
ALMERA ALMERA is offline
Miembro
 
Registrado: may 2003
Posts: 42
Reputación: 0
ALMERA Va por buen camino
Error al crear un componente muy simple.

Saludos amigos del foro, estoy creando un componente y he definido una propiedad de tipo Strings, compilo mi componente hasta aquí todo bien, pero cuando lo uso en tiempo de diseño he intento entrar en esta propiedad, el inspector de objetos me da el siguiente error: "Cannot assigned a nil to a TRichEditStrings." no comprendo el porque de esto, uso Delphi6 y os paso el código para que lo veais, yo creo que esta todo bién pero si alguién puede ayudarme le estaría muy agradecido, aqui va el código:

unit AMRConsultaRemotaMultihilo;

interface

uses
Windows, Messages, SysUtils, Classes,AMRHiloConsultaSqlRemota,kbmMemTable,DesignIntf,DesignEditors,VCLEditors;

type
TAMRConsultaRemotaMultihilo = class(TComponent)
private
FIpServers:TStrings;
protected
procedure SetIpServers(value:TStrings);
public
Constructor Create;
Destructor Destroy; Override;
published
property IpServers:TStrings read FIpServers write SetIpServers;
end;

procedure Register;

implementation


constructor TAMRConsultaRemotaMultihilo.create;
begin
inherited create(nil);
FIpServers:=TStringList.Create;
end;

Destructor TAMRConsultaRemotaMultihilo.Destroy;
begin
freeandnil(FIpServers);
inherited;
end;


procedure TAMRConsultaRemotaMultihilo.SetIpServers(value:TStrings);
begin
FIpServers.Assign(value);
end;

procedure Register;
begin
RegisterComponents('AMR-SOFT', [TAMRConsultaRemotaMultihilo]);
end;

end.
Responder Con Cita