1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-08-13 16:53:59 -04:00

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
This commit is contained in:
Raymond 2010-01-12 15:26:14 +00:00
parent 464be3215c
commit 6b55f916c1
3 changed files with 2 additions and 13 deletions

View File

@ -13,10 +13,10 @@ var
begin; begin;
TempVar := False; TempVar := False;
Result := false; Result := false;
MyForm := CreateForm; MyForm := TForm.Create(nil);
MyForm.Width := 250; MyForm.Width := 250;
MyForm.Height := 250; MyForm.Height := 250;
AButton := CreateButton(MyForm); AButton := TButton.Create(MyForm);
AButton.Parent := MyForm; AButton.Parent := MyForm;
Abutton.SetBounds(100,100,100,50); Abutton.SetBounds(100,100,100,50);
AButton.OnClick := @OnClick; AButton.OnClick := @OnClick;

View File

@ -54,15 +54,6 @@ begin;
bmp.Free; bmp.Free;
end; 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; function MinE(a, b: Extended): Extended;
begin; begin;
result := min(a,b); result := min(a,b);

View File

@ -84,8 +84,6 @@ AddFunction(@psWait, 'procedure Sleep(t: integer);');
AddFunction(@GetTickCount, 'function GetSystemTime: LongWord;'); AddFunction(@GetTickCount, 'function GetSystemTime: LongWord;');
AddFunction(@GetTickCount, 'function GetTickCount: LongWord;'); AddFunction(@GetTickCount, 'function GetTickCount: LongWord;');
AddFunction(@GetTimeRunning,'function GetTimeRunning: 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(@ConvertTime,'procedure ConvertTime(Time : integer; var h,m,s : integer);');
AddFunction(@HakunaMatata,'procedure HakunaMatata;'); AddFunction(@HakunaMatata,'procedure HakunaMatata;');
AddFunction(@TerminateScript,'procedure TerminateScript;'); AddFunction(@TerminateScript,'procedure TerminateScript;');