Class TCoolObject (unit uCoolObject) |
Inherits from
TAutoObjectWithEvents
ICoolObject
TCoolObject started as a standard Automation object created with the Delphi
"New ... Automation Object" wizard. But then the auto-generated code was
modified to be an AutoObjectWithEvents (see uComEvents - thank you
Ryan VanIderstine).
constructor Create;
destructor Destroy;
procedure EventSinkChanged( const Events: IUnknown );
TAutoObjectWithEvents Stuff
procedure FireOnShowMessage(const S:WideString);
Helper procedures - event firing
function Get_CurrentMessage: WideString;
ICoolObject Interface
procedure Initialize;
procedure Set_CurrentMessage(const Value: WideString);
procedure ShowMessage(const S: WideString);
procedure ShowMessageNoEvent(const S: WideString);
Uses a helper function to fire events.
FCoolObjectEvents : ICoolObjectEvents;
FCurrentMessage : WideString;
stores the interface to the current event sink.
constructor Create;
destructor Destroy;
procedure EventSinkChanged( const Events: IUnknown );
TAutoObjectWithEvents Stuff
procedure FireOnShowMessage(const S:WideString);
Helper procedures - event firing
function Get_CurrentMessage: WideString;
ICoolObject Interface
procedure Initialize;
procedure Set_CurrentMessage(const Value: WideString);
procedure ShowMessage(const S: WideString);
procedure ShowMessageNoEvent(const S: WideString);
Uses a helper function to fire events. Some events need to have some of their parameters manipulated so that they're in an automation compatible type. OnShowMessage needs no such manipulation sine it only passes a WideString.
FCoolObjectEvents : ICoolObjectEvents;
FCurrentMessage : WideString;
stores the interface to the current event sink.