| Class TCoolObject (unit uCoolObject) |
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).
| Constructors |
constructor Create;| Functions |
destructor Destroy;
procedure EventSinkChanged( const Events: IUnknown );
procedure FireOnShowMessage(const S:WideString);
function Get_CurrentMessage: WideString;
procedure Initialize;
procedure Set_CurrentMessage(const Value: WideString);
procedure ShowMessage(const S: WideString);
procedure ShowMessageNoEvent(const S: WideString);| Properties |
| Events |
| Variables |
FCoolObjectEvents : ICoolObjectEvents;
FCurrentMessage : WideString;| Constructors |
constructor Create;| Functions |
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.
| Properties |
| Events |
| Variables |
FCoolObjectEvents : ICoolObjectEvents;
FCurrentMessage : WideString;stores the interface to the current event sink.