[Lazarus] Namespace

Mattias Gaertner nc-gaertnma at netcologne.de
Wed Jan 12 19:26:14 CET 2011


On Wed, 12 Jan 2011 15:00:51 -0300
Marcos Douglas <md at delfire.net> wrote:

> 2011/1/12 Mattias Gaertner <nc-gaertnma at netcologne.de>:
> >> But I can register a component called TButton?
> >
> > No, that would conflict with the LCL TButton. See the FCL function
> > FindClass.
> 
> I know.
> 
> >> Because that I proposed the Lazarus put the unit name in the code,
> >> automatic...
> > Just use the right unit order.
> 
> What is that mean?

It means, that instead of

use StdCtrls, MyEdit;

TForm1 = class(TForm)
  e1: StdCtrls.TEdit;
  e2: StdCtrls.TEdit;
  e3: StdCtrls.TEdit;
  e4: StdCtrls.TEdit;
end;

.. you can simply use:

use MyEdit, StdCtrls;

TForm1 = class(TForm)
  e1: TEdit;
  e2: TEdit;
  e3: TEdit;
  e4: TEdit;
end;

Mattias




More information about the Lazarus mailing list