From 6b55f916c1dacac60a46747bd0e204a5738a0bb6 Mon Sep 17 00:00:00 2001 From: Raymond Date: Tue, 12 Jan 2010 15:26:14 +0000 Subject: [PATCH] Component creating now seems to work fine in PascalScript! git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@400 3f818213-9676-44b0-a9b4-5e4c4e03d09d --- Tests/PS/FormTest.mufa | 4 ++-- Units/MMLAddon/PSInc/Wrappers/other.inc | 9 --------- Units/MMLAddon/PSInc/psexportedmethods.inc | 2 -- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/Tests/PS/FormTest.mufa b/Tests/PS/FormTest.mufa index cf4a8c1..f5031a4 100644 --- a/Tests/PS/FormTest.mufa +++ b/Tests/PS/FormTest.mufa @@ -13,10 +13,10 @@ var begin; TempVar := False; Result := false; - MyForm := CreateForm; + MyForm := TForm.Create(nil); MyForm.Width := 250; MyForm.Height := 250; - AButton := CreateButton(MyForm); + AButton := TButton.Create(MyForm); AButton.Parent := MyForm; Abutton.SetBounds(100,100,100,50); AButton.OnClick := @OnClick; diff --git a/Units/MMLAddon/PSInc/Wrappers/other.inc b/Units/MMLAddon/PSInc/Wrappers/other.inc index 2b226d7..2cae9ee 100644 --- a/Units/MMLAddon/PSInc/Wrappers/other.inc +++ b/Units/MMLAddon/PSInc/Wrappers/other.inc @@ -54,15 +54,6 @@ begin; bmp.Free; end; -function CreateForm : TForm; -begin; - result := TForm.Create(nil); -end; -function CreateButton(Owner : TComponent) : TButton; -begin - Result := TButton.Create(Owner); -end; - function MinE(a, b: Extended): Extended; begin; result := min(a,b); diff --git a/Units/MMLAddon/PSInc/psexportedmethods.inc b/Units/MMLAddon/PSInc/psexportedmethods.inc index d1dff2f..64159c5 100644 --- a/Units/MMLAddon/PSInc/psexportedmethods.inc +++ b/Units/MMLAddon/PSInc/psexportedmethods.inc @@ -84,8 +84,6 @@ AddFunction(@psWait, 'procedure Sleep(t: integer);'); AddFunction(@GetTickCount, 'function GetSystemTime: LongWord;'); AddFunction(@GetTickCount, 'function GetTickCount: LongWord;'); AddFunction(@GetTimeRunning,'function GetTimeRunning: LongWord;'); -AddFunction(@CreateForm,'function CreateForm : TForm;'); -AddFunction(@CreateButton,'function CreateButton(Owner : TComponent) : TButton'); AddFunction(@ConvertTime,'procedure ConvertTime(Time : integer; var h,m,s : integer);'); AddFunction(@HakunaMatata,'procedure HakunaMatata;'); AddFunction(@TerminateScript,'procedure TerminateScript;');