var
F1, F2 MyFrame.MyGenericFrame;
Begin
F1 := MyFrame.MyGenericFrame.Create(Self);
F1.Parent := Self;
F2 := MyFrame.MyGenericFrame.Create(Self);
F2.Parent := Self;
Any Ideas ?
Thanks,
Roberto
> I have created a Frame inside a package. I'm trying to dynamically
> create two or more instances of my frame inside a VCL Form. The first
> one works fine. The second one raises the following exception "The
> component named MyFrame already exists". This is how I'm creating the
> Frames:
>
> var
> F1, F2 MyFrame.MyGenericFrame;
> Begin
> F1 := MyFrame.MyGenericFrame.Create(Self);
F1.Name := 'Frame1';
> F1.Parent := Self;
>
> F2 := MyFrame.MyGenericFrame.Create(Self);
F2.Name := 'Frame2';
> F2.Parent := Self;
As the error already says, you are creating two frames with the same
name. This causes problems with registration.
--
Rudy Velthuis [TeamB] http://rvelthuis.de/
"Descended from the apes? Let us hope that it is not true. But if it
is, let us pray that it may not become generally known."
-- FA Montagu.