und ausserdem nimmt der das ß nicht. Das ist ein ungültiges zeichen.
so wird ein schuh draus.
Delphi-Quellcode:
unit Unit1;
interface
uses
Windows, SysUtils, Classes, Controls, Forms, StdCtrls;
type
TForm1 =
class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure schliessen;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure StarteRoutineByName(Instance : TObject;
Name :
string);
type
TExecute =
procedure of object;
var
Routine : TMethod;
Execute : TExecute;
begin
Routine.Data := Pointer(Instance);
Routine.Code := Instance.MethodAddress(
Name);
if Routine.Code =
nil then Exit;
Execute := TExecute(Routine);
Execute;
end;
procedure TForm1.schliessen;
begin
Close;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
StarteRoutineByName(Form1,'
schliessen');
end;
end.
Thomas H.