[lazarus] FCL and RegisterComponents

Peter Dyson peter at skel.demon.co.uk
Thu Mar 2 16:00:50 EST 2000

> Can someone tell me why RegisterComponents is
> implemented the way it is?
> As I see it, a unit ahould be able to be compiled
> directly into an application without it being added
> to the toolbar, after that is how we create and debug
> the things. Also compiled programs should not be
> running the implementation code at all, which it would
> in the current scheme.
> I suggest putting a dummy proc
> procedure RegisterComponents(const Page: string; Components: array of
> Pointer);
> in something like vclglobals to take care of the executable problem
> and then when the IDE uses the Install Component it calls the current
> fcl implementation as InternalRegisterComponents, which then takes
> care of all the IDE/Component relationships.

Ok I looked at it further it just needs the code removing from
here and putting it in a new proc which is then assigned by the IDE
That way if there is no proc assigned to the RegisterComponentsProc
then it don't get compiled in. This means this is an IDE specific singleton
class, that needs a dummy for normal execution or some way of setting
the RegisterComponentsProc in a compiled ppu. Probably easier to let 
the IDE copy a different ppu to the libs dir when installing components.


More information about the Lazarus mailing list