hi ich habe con tabstract socket nun eine komponente abgeleietet....alle avstrakten methodne überschrieben (mit keinem stück code)...hab die kompo auf die form geschoben und gestartet...und natürlich immernoch fehler.... hat noch jemand ne idee?
so sieht sie derzeit aus...
Delphi-Quellcode:
unit TSClientSocket;
interface
uses
ScktComp, Classes, SysUtils;
type TTSServer = (tsEuro, tsPacific, tsUS);
type
TTSClientSocket =
class(TAbstractSocket)
private
FNick:
string;
FPassword:
string;
FSerial:
string;
FTSServer: TTSServer;
FOnPing: TNotifyEvent;
protected
procedure Event(Socket: TCustomWinSocket; ErrorEvent: TSocketEvent);
override;
procedure Error(Socket: TCustomWinSocket; ErrorEvent: TErrorEvent;
var ErrorCode: Integer);
overload;
procedure DoActivate(Value: Boolean);
overload;
published
property Nick:
string read FNick
write FNick;
property Password:
string read FPassword
write FPassword;
property Serial:
string read FSerial
write FSerial;
property Server: TTSServer
read FTSServer
write FTSServer;
end;
procedure Register;
implementation
procedure TTSClientSocket.Event(Socket: TCustomWinSocket; ErrorEvent: TSocketEvent);
begin
case ErrorEvent
of
seConnect:
begin
with Socket
do
begin
SendText('
CVERS 11015 4608' + #13#10);
SendText('
PASS supersecret' + #13#10);
SendText('
NICK ' + FNick + #13#10);
SendText('
apgar ' + FPassword + #13#10);
SendText('
Serial ' + FSerial + #13#10);
SendText('
USER UserName HostName irc.westwood.com :RealName' + #13#10);
SendText('
VERCHK 32512 720911' + #13#10);
SendText('
SETOPT 16,32' + #13#10);
end;
end;
seRead:
begin
// später
end;
end;
end;
procedure TTSClientSocket.Error(Socket: TCustomWinSocket; ErrorEvent: TErrorEvent;
var ErrorCode: Integer);
begin
end;
procedure TTSClientSocket.DoActivate(Value: Boolean);
begin
end;
procedure Register;
begin
RegisterComponents('
blubb', [TTSClientSocket]);
end;
end.
was is da noch falsch? ich muss ja irgendwi ne komponente von TAbstractSocket ableiten koennen :\