Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi Wie kann ich einen TNotifyEvent noch eine Variable mitgeben (https://www.delphipraxis.net/55834-wie-kann-ich-einen-tnotifyevent-noch-eine-variable-mitgeben.html)

Net7 27. Okt 2005 17:37


Wie kann ich einen TNotifyEvent noch eine Variable mitgeben
 
Wie kann ich einen TNotifyEvent noch eine Variable mitgeben??

ähnlich

Delphi-Quellcode:
procedure TForm1.ClientSocket1Error(Sender: TObject;
  Socket: TCustomWinSocket; ErrorEvent: TErrorEvent;
  var ErrorCode: Integer);// <-- so wie hier der error.. mitgegeben wird
wie funktioniert das bei der Komponentenprogrammierung?? :gruebel:

jbg 27. Okt 2005 17:42

Re: Wie kann ich einen TNotifyEvent noch eine Variable mitge
 
Zitat:

Zitat von Net7
Wie kann ich einen TNotifyEvent noch eine Variable mitgeben??

Gar nicht.

Zitat:

wie funktioniert das bei der Komponentenprogrammierung?? :gruebel:
Es gibt auch noch mehr als TNotifyEvent.

TNotifyEvent ist nichts anderes als:
Delphi-Quellcode:
type
  TNotifyEvent = procedure(Sender: TObject) of object;
Nun 1 und 1 zusammenzählen und programmieren.

Net7 27. Okt 2005 17:55

Re: Wie kann ich einen TNotifyEvent noch eine Variable mitge
 
Zitat:

Zitat von jbg
Zitat:

Zitat von Net7
Wie kann ich einen TNotifyEvent noch eine Variable mitgeben??

Gar nicht.

Zitat:

wie funktioniert das bei der Komponentenprogrammierung?? :gruebel:
Es gibt auch noch mehr als TNotifyEvent.

TNotifyEvent ist nichts anderes als:
Delphi-Quellcode:
type
  TNotifyEvent = procedure(Sender: TObject) of object;
Nun 1 und 1 zusammenzählen und programmieren.

Also so...

Delphi-Quellcode:

unit Kompo;

interface

uses
  SysUtils, Classes, ScktComp;

TMeinEvent = procedure (Sender:TObject;var Typ:Integer) of object;
.
.
.
private

FOnMeinEvent:TMeinEvent;
.
.

published

property   OnMeinEvent:TMeinEvent read FOnMeinEvent write FOnMeinEvent;

.
.
.
:mrgreen:


Vielen Dank!!


Alle Zeitangaben in WEZ +1. Es ist jetzt 14:36 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz