Einzelnen Beitrag anzeigen

Benutzerbild von Phoenix
Phoenix
(Moderator)

Registriert seit: 25. Jun 2002
Ort: Hausach
7.641 Beiträge
 
#4

Re: Event Handler in Delphi

  Alt 30. Okt 2007, 10:55
Nope. As the compiler says: In Delphi.NET you must use the Include/Exclude functions to add/delete Eventhandler. That's because in CLR you always have multicast delegates (you can add more than one handler to a single event at a given time), and Delphi does not know the += / -= syntax to add / remove a single handler from an event. So you have to use Include(Event, Eventhandler); or Exclude(Event, Eventhandler); instead of Event := handler; .
If you can understand a bit of german, then have a look at this excellent article from Sakura: http://www.delphipraxis.net/internal...=248261#248261
Sebastian Gingter
Phoenix - 不死鳥, Microsoft MVP, Rettungshundeführer
Über mich: Sebastian Gingter @ Thinktecture Mein Blog: https://gingter.org
  Mit Zitat antworten Zitat