(Gast)
n/a Beiträge
|
Re: Problem eigene Komponenten miteinander verbinden
7. Jun 2005, 10:13
Delphi-Quellcode:
unit MaxMySqlQuery;
interface
uses
SysUtils, Classes, mysql,MaxMySqlCon;
type
TMaxMySqlQuery = class(TComponent)
private
{ Private-Deklarationen }
FSource : TMaxMySqlCon;
protected
{ Protected-Deklarationen }
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
public
{ Public-Deklarationen }
published
{ Published-Deklarationen }
property Datasource : TMaxMySqlCon read FSource write FSource;
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents(' Samples', [TMaxMySqlQuery]);
end;
procedure TMaxMySqlQuery.Notification(Acomponent : TComponent; Operation: TOperation);
begin
if (Operation = opRemove) and (AComponent is TMaxMySqlCon) then
FSource := nil;
end;
end.
öhm
|
|
Zitat
|