home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2000 February
/
Chip_2000-02_cd.bin
/
zkuste
/
Delphi
/
navody
/
tt
/
objvm.exe
/
UNITS
/
LangProc.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1998-06-26
|
1KB
|
39 lines
{see TLangProc}
unit LangProc;
interface
uses VisualValue,
LangValue,Classes;
type
{TExecEvent is an event to implement Exec method of TLangProc}
{see Exec method reference for details }
TExecEvent=procedure (Sender:TVisualValue;S:IValStack;MustReturn:boolean)
of object;
type TLangProc=class(TVisualValue)
protected
fOnExec:TExecEvent;
public
procedure Exec(S:IValStack;MustReturn:boolean);override;
function CreateSame(o:TComponent):TVisualValue;override;
published
property OnExec:TExecEvent read fOnExec write fOnExec;
{This event is triggered on procedure call }
{see Exec method for details }
end;
implementation
procedure TLangProc.Exec;
begin
if Assigned(fOnExec) then
begin
OnExec(Self,S,MustReturn);
end;
end;
function TLangProc.CreateSame;
begin
Result:=Inherited CreateSame(o);
(Result as TLangProc).OnExec:=OnExec;
end;
end.