🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.delphi.rtl.dotnet
2 messages
2 total messages Started by Roberto Meneghini Wed, 18 Jan 2006 18:31
Dynamically created TFrame
#41
Author: Roberto Meneghini
Date: Wed, 18 Jan 2006 18:31
20 lines
1487 bytes
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.Parent := Self;

    F2 := MyFrame.MyGenericFrame.Create(Self);
    F2.Parent := Self;

Any Ideas ?

Thanks,

Roberto 
Re: Dynamically created TFrame
#42
Author: Rudy Velthuis [TeamB]
Date: Sun, 22 Jan 2006 22:05
32 lines
2075 bytes
At 19:31:16, 18.01.2006, Roberto Meneghini wrote:

> 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.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads