Registriert seit: 2. Okt 2012
38 Beiträge
|
Superobject
8. Okt 2012, 21:44
Hello!
Is there a more native way to do this in XE3? Without the superobject library?
Delphi-Quellcode:
unit Unit4;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs,superobject, Vcl.StdCtrls;
type
TForm4 = class(TForm)
Button1: TButton;
procedure TestMethod(value,test: string);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form4: TForm4;
implementation
{$R *.dfm}
procedure TForm4.Button1Click(Sender: TObject);
begin
Label1.Caption:=SOInvoke(Self, ' TestMethod', SO(' {value: "hello",test: "hello"}')).AsString;
end;
procedure TForm4.TestMethod(value,test: string);
begin
Caption := value;
Button1.Caption:=test;
result:=' blabla';
end;
end.
Geändert von Ryzinski ( 8. Okt 2012 um 21:53 Uhr)
|
|
Zitat
|