unit RAI2_MyLabel;

interface

uses Classes, RAI2;

  procedure RegisterRAI2Adapter(RAI2Adapter: TRAI2Adapter);

implementation

uses MyLabel;


  { TMyLabel }

{  procedure DoSomething; }
procedure TMyLabel_DoSomething(var Value: Variant; Args: TArgs);
begin
  TMyLabel(Args.Obj).DoSomething;
end;

{ property Write SomeProperty(Value: String) }
procedure TMyLabel_Write_SomeProperty(const Value: Variant; Args: TArgs);
begin
  TMyLabel(Args.Obj).SomeProperty := Value;
end;

procedure RegisterRAI2Adapter(RAI2Adapter: TRAI2Adapter);
begin
  with RAI2Adapter do
  begin
   { TMyLabel }
    AddClass('MyLabel', TMyLabel, 'TMyLabel');
    AddGet(TMyLabel, 'DoSomething', TMyLabel_DoSomething, 0, [0], varEmpty);
    AddSet(TMyLabel, 'SomeProperty', TMyLabel_Write_SomeProperty, 0, [varString]);
    RegisterClasses([TMyLabel]);
  end;    { with }
end;    { RegisterRAI2Adapter }

initialization
  RegisterRAI2Adapter(GlobalRAI2Adapter);
end.
