Fastscript BUG???
unit MyClassUnit;
interface
uses
Dialogs;
type
TMyClass = class(TObject)
public
procedure Kill(msg: String);
constructor Create;
destructor Destroy;override;
end;
implementation
constructor TMyClass.Create;
begin
ShowMessage('Call contructor');
inherited;
end;
destructor TMyClass.Destroy;
begin
inherited;
end;
procedure TMyClass.Kill(msg: String);
begin
ShowMessage(msg);
end;
end.
....
with fsGlobalUnit.AddClass(TMyClass, 'TObject') do
begin
AddMethod('procedure Kill(msg: String)', CallMethod);
end;
my pascal script code
var
OneClass: TMyClass;
begin
OneClass := TMyClass.Create;
OneClass.Kill('Soneone');
OneClass.Free;
end.
my contructor Create procedure is never been called!why?
interface
uses
Dialogs;
type
TMyClass = class(TObject)
public
procedure Kill(msg: String);
constructor Create;
destructor Destroy;override;
end;
implementation
constructor TMyClass.Create;
begin
ShowMessage('Call contructor');
inherited;
end;
destructor TMyClass.Destroy;
begin
inherited;
end;
procedure TMyClass.Kill(msg: String);
begin
ShowMessage(msg);
end;
end.
....
with fsGlobalUnit.AddClass(TMyClass, 'TObject') do
begin
AddMethod('procedure Kill(msg: String)', CallMethod);
end;
my pascal script code
var
OneClass: TMyClass;
begin
OneClass := TMyClass.Create;
OneClass.Kill('Soneone');
OneClass.Free;
end.
my contructor Create procedure is never been called!why?