constructor TFunctions.Create;
begin
with fsGlobalUnit do
begin
with AddClass(TMyClass, 'TObject') do
begin
AddDefaultProperty('Cell', 'Word, Word', 'TCell ', CallMethod, True);
end;
end;
function TFunctions.CallMethod(Instance: TObject; ClassType: TClass;
const MethodName: string; var Params: Variant): Variant;
begin
Result := 0;
if ClassType = TMyClass then
begin
if MethodName = 'CELL.GET' then
Result := Integer(TMyClass(Instance).Cell[Params[0], Params[1]])
end;
end;
Комментарии
constructor TFunctions.Create;
begin
with fsGlobalUnit do
begin
with AddClass(TMyClass, 'TObject') do
begin
AddDefaultProperty('Cell', 'Word, Word', 'TCell ', CallMethod, True);
end;
end;
function TFunctions.CallMethod(Instance: TObject; ClassType: TClass;
const MethodName: string; var Params: Variant): Variant;
begin
Result := 0;
if ClassType = TMyClass then
begin
if MethodName = 'CELL.GET' then
Result := Integer(TMyClass(Instance).Cell[Params[0], Params[1]])
end;
end;