Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2000-03

FCL and RegisterComponents

2 messages · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Peter Dyson

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.

Peter

Reply by email

Peter Dyson
to Peter Dyson
Show quoted text 16 lines
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.

Peter.

Reply by email