How to re-use an Object-Variable

edited 1:17PM in FastScript
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

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.