How to re-use an Object-Variable
Hi,
I have several scripts to Create some WinControls.
My application creates a panel for each script in witch the script should create the WinControls (like Edit, Memo).
The created Panel is added by fsGlobalUnit.AddObject('Panel',Panel1).
For the next Script the Panel is also added by fsGlobalUnit.AddObject('Panel',Panel2).
What I want is using always the same Name for the panel-object witch can change for each script.
Like:
In my app:
fsGlobalUnit.AddObject('Panel',Panel1).
//First Script
begin
with TEdit.Create(Panel) do begin
parent:=Panel;
end;
end.
In my app:
fsGlobalUnit.AddObject('Panel',Panel2).
//Second Script
begin
with TMemo.Create(Panel) do begin
parent:=Panel;
end;
end.
When i add the panal-object the second time the script nevertheless creates the Memo in the first-panel.
How can i remove the first panel-object or how can i define for the second script, that the 'Panel' Object has changed.
Would be appriciated to get some help.
Thanks
seehauti
I have several scripts to Create some WinControls.
My application creates a panel for each script in witch the script should create the WinControls (like Edit, Memo).
The created Panel is added by fsGlobalUnit.AddObject('Panel',Panel1).
For the next Script the Panel is also added by fsGlobalUnit.AddObject('Panel',Panel2).
What I want is using always the same Name for the panel-object witch can change for each script.
Like:
In my app:
fsGlobalUnit.AddObject('Panel',Panel1).
//First Script
begin
with TEdit.Create(Panel) do begin
parent:=Panel;
end;
end.
In my app:
fsGlobalUnit.AddObject('Panel',Panel2).
//Second Script
begin
with TMemo.Create(Panel) do begin
parent:=Panel;
end;
end.
When i add the panal-object the second time the script nevertheless creates the Memo in the first-panel.
How can i remove the first panel-object or how can i define for the second script, that the 'Panel' Object has changed.
Would be appriciated to get some help.
Thanks
seehauti