Einzelnen Beitrag anzeigen

FaNIX

Registriert seit: 8. Okt 2007
36 Beiträge
 
#1

Event Handler in Delphi

  Alt 30. Okt 2007, 09:14
How do i set the event for a specific class event?

This is how it looks in VB.NET
Delphi-Quellcode:
        AddHandler FtpClient.MessageReceive, AddressOf FtpClient_MessageReceive
        AddHandler FtpClient.MessageSend, AddressOf FtpClient_MessageSend
Below is the hand coded event i want to assign to the class:
procedure FtpClient_Feedback(Sender : TObject; E : TKFP.Net.MessageArgs); Here is the declaration of the class event:


http://img136.imageshack.us/img136/3082/29591014oc2.jpg

The following doesnt work:

 Fo_FtpClient.MessageReceive := FtpClient_Feedback; I get the following errors:
[Pascal Error] u_fdn_FTP_Dot_Net.pas(93): E2298 read/write not allowed for CLR events. Use Include/Exclude procedure
[Pascal Error] u_fdn_FTP_Dot_Net.pas(93): E2035 Not enough actual parameters

[edit=Phoenix]Marked as a .NET topic. Mfg, Phoenix[/edit]
  Mit Zitat antworten Zitat