Board index » cppbuilder » is the constructor an IDE-managed component?

is the constructor an IDE-managed component?

Maybe a stupid question, but i do not know the answer :

I thought that every IDE-managed Component is declared in the
"__published:" section of the class declaration.
But the constructor itself is declared in the "public:" section.
Can somebody explain?

Here is an example :

class TParseForm : public TForm
{
__published: // IDE-managed Components
 TEdit *PathEdit;
 TEdit *FilesEdit;
 TButton *GoButton;
 TStringGrid *StringGrid1;
 void __fastcall GoButtonClick(TObject *Sender);

 void __fastcall StringGrid1Click(TObject *Sender);
private: // User declarations
public:  // User declarations
 __fastcall TParseForm(TComponent* Owner);

Quote
};

extern TParseForm *ParseForm;
 

Re:is the constructor an IDE-managed component?


Quote
Luc Saffre <pac.syst...@skynet.be> wrote:
>I thought that every IDE-managed Component is declared in the
>"__published:" section of the class declaration.
>But the constructor itself is declared in the "public:" section.
>Can somebody explain?

The constructor is NOT a component in any meaningful sense of the word.

However, a constructor is required. The IDE just inserts it for you as a
convenience because it might as well.

--
Lucian Wischik, Queens' College, Cambridge CB3 9ET. ljw1...@cam.ac.uk

Re:is the constructor an IDE-managed component?


Hi Luc,

The constructor is for you to fill out. It must have public access. The IDE
scans the __published section and edits it as you use the Form Editor and
the Object Inspector - you should avoid editing in there.

I hope this helps,
Take Care,
Sam.

--

Sam Azer            mailto:S...@AzerTech.com
Systems Analyst     http://AzerTech.com/?svc
Tips 'n Techniques: http://AzerTech.com/?ttm
C++Builder FAQs:    http://AzerTech.com/?bcb

Luc Saffre <pac.syst...@skynet.be> wrote in article
<66j6s7$...@forums.borland.com>...

Quote
> Maybe a stupid question, but i do not know the answer :

> I thought that every IDE-managed Component is declared in the
> "__published:" section of the class declaration.
> But the constructor itself is declared in the "public:" section.
> Can somebody explain?

> Here is an example :

> class TParseForm : public TForm
> {
> __published: // IDE-managed Components
>  TEdit *PathEdit;
>  TEdit *FilesEdit;
>  TButton *GoButton;
>  TStringGrid *StringGrid1;
>  void __fastcall GoButtonClick(TObject *Sender);

>  void __fastcall StringGrid1Click(TObject *Sender);
> private: // User declarations
> public:  // User declarations
>  __fastcall TParseForm(TComponent* Owner);
> };

> extern TParseForm *ParseForm;

Other Threads