Einzelnen Beitrag anzeigen

Benutzerbild von Amnon82
Amnon82

Registriert seit: 5. Jan 2005
186 Beiträge
 
FreePascal / Lazarus
 
#7

DesignIntf - D9PE ?!?

  Alt 16. Jul 2006, 09:01
Ich hab mir nochmal diesen Thread durchgelesen.

Für "RegisterPropertyInCategory" braucht man die DesignIntf.dcu

[Fatal Error] DA_IrcClient.pas(12): F1026 File not found: 'DesignIntf.dcu' Hier nochmal der Part mit der Registrierung in englischer Form:

Delphi-Quellcode:
{******************************************************************}
{                                                                  }
{ Delhiarea-IRC-Components 0.1.2 by Amnon82 (C)2006 AMSOFT         }
{                                                                  }
{******************************************************************}

unit DA_IrcClient;

interface

uses
  Windows, SysUtils, Classes, ScktComp, WinSock, DA_CutBreak{, DesignIntf, DesignEditors};

type
  TDA_IrcClient = class;
  Tstr200max = String[200];
  TManualAuto = (Manual, Auto);
  TIDOnUnknownCTCPAnswer = procedure(Sender: TDA_IrcClient; LongNick: string; Nick: string; CTCPOrder: string; CTCPRequest: string; var CTCPAnswer: string; RawData: string) of object;
  TIDOnCTCPAction = procedure(Sender: TDA_IrcClient; LongNick: string; Nick: string; MSGToSend: string; Action: string; RawData: string) of object;
  TIDPing = procedure(Sender: TDA_IrcClient; AutoAnswer: string; RawData: string) of object;
  TDccGet = procedure(Sender: TDA_IrcClient; LongNick: string; Nick: string; FileName, SenderIPAddresse: string; Port: integer; BytesToGet: Longint) of object;
  TDccResume = procedure(Sender: TDA_IrcClient; LongNick: string; Nick: string; FileName: string; Port: integer; BytesToGet: Longint) of object;
  TDccChat = procedure(Sender: TDA_IrcClient; LongNick: string; Nick: string; SenderIPAddress: string; Port: integer) of object;
  TIDRawData = procedure(Sender: TDA_IrcClient; RawData: string) of object;
  TIDKickMSG = procedure(Sender: TDA_IrcClient; LongNick: string; Nick: string; Channel: string; KickMSG: string; RawData: string) of object;
  TIDTopicMSG = procedure(Sender: TDA_IrcClient; LongNick: string; Nick: string; Channel: string; MSG: string; RawData: string) of object;
  TIDChannelMSG = procedure(Sender: TDA_IrcClient; LongNick: string; Nick: string; Channel: string; MSG: string; RawData: string) of object;
  TIDPrivateMSG = procedure(Sender: TDA_IrcClient; LongNick: string; Nick: string; Priv: string; MSG: string; RawData: string) of object;
  TIDOnNoticePrivateMSG = procedure(Sender: TDA_IrcClient; LongNick: string; Nick: string; Notice: string; MSG: string; RawData: string) of object;
  TIDOnNoticePublicMSG = procedure(Sender: TDA_IrcClient; LongNick: string; Nick: string; Notice: string; MSG: string; RawData: string) of object;
  TIDOnJoinMSG = procedure(Sender: TDA_IrcClient; LongNick: string; Nick: string; Channel: string; RawData: string) of object;
  TIDOnPartMSG = procedure(Sender: TDA_IrcClient; LongNick: string; Nick: string; Channel: string; RawData: string) of object;
  TIDOnCloseMSG = procedure(Sender: TDA_IrcClient; LongNick: string; Nick: string; CloseMSG: string; RawData: string) of object;
  TIDOnNickChange = procedure(Sender: TDA_IrcClient; OldLongNick: string; OldShortNick: string; NewNick: string; RawData: string) of object;
  TIDOnVersionRequest = procedure(Sender: TDA_IrcClient; LongNick: string; Nick: string; RawData: string) of object;
  TIDOnTimeRequest = procedure(Sender: TDA_IrcClient; LongNick: string; Nick: string; Var TimeAnswer: string; RawData: string) of object;

  TIDChannelNames = procedure(Sender: TDA_IrcClient; LongNick: string; chan: string; NickName: string; RawData: string) of object;
  TIDChannelNamesEnd = procedure(Sender: TDA_IrcClient; Channel: string; RawData: string) of object;
  TIDChannelTopic = procedure(Sender: TDA_IrcClient; Channel: string; Topic: string; RawData: string) of object;
  TIDNickInUse = procedure(Sender: TDA_IrcClient; NickInUse: string; RawData: string) of object;
  TIDUnknownNumbers = procedure(Sender: TDA_IrcClient; Number: string; RawData: string) of object;

// type TSocketNotifyEvent = procedure (Sender: TObject; Socket: TCustomWinSocket) of object;

TDA_IrcClient = class(TComponent)
 Private
  { Private declarations }
  CutBreak1: TDA_CutBreak;
  CutBreak2: TDA_CutBreak;
  tmplist: TStringList;
  destroyb: Boolean;
  procedure TriggerOnDataAvailable(Sender: TObject; Socket: TCustomWinSocket);
  procedure TriggerOnDataSend(Sender: TObject; Socket: TCustomWinSocket);
  procedure TriggerOnConnection(Sender: TObject; Socket: TCustomWinSocket);
  procedure TriggerOnDisconnection(Sender: TObject; Socket: TCustomWinSocket);
  procedure TriggerOnErrorMSG(Sender: TObject; Socket: TCustomWinSocket; FehlerEvent: TErrorEvent; var FehlerCode: Integer);
  procedure WorkOnMSG(Sender: TDA_IrcClient; MSGList: Tstringlist; RawData: String);
  procedure WorkOnCTCPMSG(Sender: TDA_IrcClient; LongNick : String; Nick: String; Source: String; MSGList: TStringList; RawData: String);
  procedure WorkOnUndefinierteMSG(Sender: TDA_IrcClient; numerisch: Word; MSGList : Tstringlist; RawData: String);
  function isInteger(szString: String):Boolean;
  function CopyFrom(const S: String; const Start: Integer): String;
  function CopyAt(const S: String; const SearchFor: String; const Start: Integer): String;
  function CopyLeft(const S: String; const Count: Integer): String;
 protected
  { Protected declarations }
  FInBuf: String;
  FUserName: String;
  FRealName: String;
  FIRCHost: String;
  FIRCPort: Integer;
  FEmail: String;
  FNickname: String;
  FAltNick: String;
  FIrcPassword: String;
  FPingAnswer: TManualAuto;
  FChangeAltNick: TManualAuto;
  FOnPing: TIDPing;
  FOnCTCPAction: TIDOnCTCPAction;
  FOnRawData: TIDRawData;
  FOnMainServerChannelMSG: TIDChannelMSG;
  FOnLocalServerChannelMSG: TIDChannelMSG;
  FOnMainServerTopicMSG: TIDTopicMSG;
  FOnLocalServerTopicMSG: TIDTopicMSG;
  FOnMainServerNoticeMSG: TIDOnNoticePublicMSG;
  FOnLocalServerNoticeMSG: TIDOnNoticePublicMSG;
  FOnPrivateMSG: TIDPrivateMSG;
  FOnNoticePrivateMSG: TIDOnNoticePrivateMSG;
  FOnJoinMSG: TIDOnJoinMSG;
  FOnPartMSG: TIDOnPartMSG;
  FOnCloseMSG: TIDOnCloseMSG;
  FMainServerKickMSG: TIDKickMSG;
  FLocalServerKickMSG: TIDKickMSG;
  FOnNickChange: TIDOnNickChange;
  FOnVersionRequest: TIDOnVersionRequest;
  FOnTimeRequest: TIDOnTimeRequest;
  FDccGet: TDccGet;
  FDccAccept: TDccResume;
  FDccResume: TDccResume;
  FDccChat: TDccChat;
  FOnUnknownCTCPAnswer: TIDOnUnknownCTCPAnswer;
  FOnNames: TIDChannelNames;
  FOnNamesList: TIDChannelNamesEnd;
  FOnTopic: TIDChannelTopic;
  FOnNickInUse: TIDNickInUse;
  FOnUnknownNumbers: TIDUnknownNumbers;
  FCloseMSG: Tstr200max;
  FVersionAnswer: Tstr200max;
  FTag: integer;
  FOnDataAvailable: TSocketNotifyEvent;
  FOnDataSend: TSocketNotifyEvent;
  FOnConnection: TSocketNotifyEvent;
  FOnDisconnection: TSocketNotifyEvent;
  FOnError: TSocketErrorEvent;
 public
  { Public declarations }
  ConnectIt: TClientSocket;
  constructor Create(AOwner: TComponent); override;
  destructor Destroy; override;
  procedure Close;
  procedure Connect;
  procedure SelfInvisible;
  procedure SelfVisible;
  procedure KickUser(Channel, NickName, Grund: String);
  procedure DeBanUser(Channel, UserHostMask: String);
  procedure BanUser(Channel, UserHostMask: String);
  procedure DeVoiceUsers(Channel, UserNickname: String);
  procedure VoiceUsers(Channel, UserNickname: String);
  procedure DeopUsers(Channel, UserNickname: String);
  procedure OpUsers(Channel, UserNickname: String);
  procedure ChannelMode(Channel, Mode, Param: String);
  procedure UserMode(Mode: String);
  procedure ChangeNick(Nickname: String);
  procedure Join(Channel: String);
  procedure Part(Channel: String);
  procedure SendPrivateMSG(Nickname, MSG: String);
  procedure SendRawData(ZuSenddeMSG: String);
  function LongIPtoPointIP(value: LongWord): String;
  function PointIPtoLongIP(str: PChar): LongWord;
  function SendChannelMSG(Chan, MSG: String): Boolean;
 published
  { Published declarations }
  property VersionAnswer: Tstr200max read FVersionAnswer write FVersionAnswer;
  property UserName: String read FUserName write FUserName;
  property RealName: String read FRealName write FRealName;
  property Email: String read FEmail write FEmail;
  property NickName: String read FNickname write FNickname;
  property AltNickName: String read FAltNick write FAltNick;
  property IRCHost: String read FIRCHost write FIRCHost;
  property IrcPort: Integer read FIRCPort write FIRCPort;
  property IrcPassword: String read FIrcpassword write FIrcpassword;
  property PingAnswer: TManualAuto read FPingAnswer write FPingAnswer;
  property ChangeAltNick: TManualAuto read FChangeAltNick write FChangeAltNick;
  property CloseMSG: Tstr200max read FCloseMSG write FCloseMSG;
  property Tag: Integer read FTag write FTag;
  property OnConnection: TSocketNotifyEvent read FOnConnection write FOnConnection;
  property OnDisconnection : TSocketNotifyEvent read FOnDisconnection write FOnDisconnection ;
  property OnError: TSocketErrorEvent read FOnError write FOnError;
  property OnPing: TIDPing read FOnPing write FOnPing;
  property OnLocalServerKick: TIDKickMSG read FLocalServerKickMSG write FLocalServerKickMSG;
  property OnMainServerKick: TIDKickMSG read FMainServerKickMSG write FMainServerKickMSG;
  property OnCTCPAction: TIDOnCTCPAction read FOnCTCPAction write FOnCTCPAction;
  property OnRawData: TIDRawData read FOnRawData write FOnRawData;
  property OnMainServerChannelMSG: TIDChannelMSG read FOnMainServerChannelMSG write FOnMainServerChannelMSG;
  property OnLocalServerChannelMSG: TIDChannelMSG read FOnLocalServerChannelMSG write FOnLocalServerChannelMSG;
  property OnMainServerNoticeMSG: TIDOnNoticePublicMSG read FOnMainServerNoticeMSG write FOnMainServerNoticeMSG;
  property OnLocalServerNoticeMSG: TIDOnNoticePublicMSG read FOnLocalServerNoticeMSG write FOnLocalServerNoticeMSG;
  property OnPrivateMSG: TIDPrivateMSG read FOnPrivateMSG write FOnPrivateMSG;
  property OnNoticePrivateMSG: TIDOnNoticePrivateMSG read FOnNoticePrivateMSG write FOnNoticePrivateMSG;
  property OnNickChange: TIDOnNickChange read FOnNickChange write FOnNickChange;
  property OnJoinMSG: TIDOnJoinMSG read FOnJoinMSG write FOnJoinMSG;
  property OnPartMSG: TIDOnPartMSG read FOnPartMSG write FOnPartMSG;
  property OnCloseMSG: TIDOnCloseMSG read FOnCloseMSG write FOnCloseMSG;
  property OnDccGet: TDccGet read FDccGet write FDccGet;
  property OnDccAccept: TDccResume read FDccAccept write FDccAccept;
  property OnDccResume: TDccResume read FDccResume write FDccResume;
  property OnDccChat: TDccChat read FDccChat write FDccChat;
  property OnVersionRequest: TIDOnVersionRequest read FOnVersionRequest write FOnVersionRequest;
  property OnTimeRequest: TIDOnTimeRequest read FOnTimeRequest write FOnTimeRequest;
  property OnTopic: TIDChannelTopic read FOnTopic write FOnTopic;
  property OnNames: TIDChannelNames read FOnNames write FOnNames;
  property OnNamesList: TIDChannelNamesEnd read FOnNamesList write FOnNamesList;
  property OnNickInUse: TIDNickInUse read FOnNickInUse write FOnNickInUse;
  property OnUnknownNumbers: TIDUnknownNumbers read FOnUnknownNumbers write FOnUnknownNumbers;
  property OnUnknownCTCPAnswer: TIDOnUnknownCTCPAnswer read FOnUnknownCTCPAnswer write FOnUnknownCTCPAnswer;
  property OnMainServerTopicMSG: TIDTopicMSG read FOnMainServerTopicMSG write FOnMainServerTopicMSG;
  property OnLocalerServerTopicMSG: TIDTopicMSG read FOnLocalServerTopicMSG write FOnLocalServerTopicMSG;
  end;

procedure Register;

const
 CR = #13;
 LF = #10;
 CRLF = #13#10;
 Version = 'TDA_IrcClient 0.1.2 - (C) 2006 by AMSOFT and DELPHIAREA';

var
 CuttedMSG:String;

implementation

// Komponente registrieren

procedure Register;
begin
 RegisterComponents('Delphiarea', [TDA_IrcClient]);
 //Mal ein Beispiel, was noch nicht klappt:
 //RegisterPropertyInCategory('DCC', TDA_IrcClient, 'OnDccAccept');
end;
Ich würde gerne die Properties ordnen. Zum Beispiel alles was mit DCC zu tun hat in eine Kategorie 'DCC'. Muss man eine CustomCategory definieren oder reicht zum Beispiel:

RegisterPropertyInCategory('DCC', TDA_IrcClient, 'OnDccAccept'); ... hoffe es klappt trotz D9PE ...

Im Anhang ein Screenshot mit allem was ich unter "Design" gefunden hab ...

Delphi-Quellcode:
package DA_IRCComponents;

{$R *.res}
{$ALIGN 8}
{$ASSERTIONS ON}
{$BOOLEVAL OFF}
{$DEBUGINFO ON}
{$EXTENDEDSYNTAX ON}
{$IMPORTEDDATA ON}
{$IOCHECKS ON}
{$LOCALSYMBOLS ON}
{$LONGSTRINGS ON}
{$OPENSTRINGS ON}
{$OPTIMIZATION ON}
{$OVERFLOWCHECKS OFF}
{$RANGECHECKS OFF}
{$REFERENCEINFO ON}
{$SAFEDIVIDE OFF}
{$STACKFRAMES OFF}
{$TYPEDADDRESS OFF}
{$VARSTRINGCHECKS ON}
{$WRITEABLECONST OFF}
{$MINENUMSIZE 1}
{$IMAGEBASE $400000}
{$DESCRIPTION 'AMSOFT|DELPHIAREA - IRC Components 0.1.2 - Alpha build'}
{$IMPLICITBUILD OFF}

requires
  rtl,
  vcl,
  designide;

contains
  DA_IrcClient in 'DA_IrcClient.pas',
  DA_CutBreak in 'DA_CutBreak.pas';

end.
designide.dcp bringt auch nichts:

Delphi-Quellcode:
[Error] DA_IrcClient.pas(1257): E2003 Undeclared identifier: 'RegisterPropertyInCategory'
[Fatal Error] DA_IRCComponents.dpk(35): F2063 Could not compile used unit 'DA_IrcClient.pas'
Miniaturansicht angehängter Grafiken
d9pedesign_146.png  
  Mit Zitat antworten Zitat