[fpc-devel] Import typelib extension

Ludo Brands ludo.brands at free.fr
Fri Dec 30 15:11:16 CET 2011


> > Is the use of {$ifdef LCL} to
> > encapsulate the Ole container in a fpc unit acceptable or is this a 
> > herecy?
> 
> Heresy, and worse, it will simply not work. A typical lazarus 
> release then would have a FPC version with the LCL disabled 
> and compiled with -Ur, and including the source directory 
> might not force recompilation or lead to all kinds of vague 
> errors (which is an unsupportable situation)
> 

Understood, I didn't think about -Ur and/or the unit not always being
recompiled.

> I would say, two units, the visual part goes to Lazarus, and 
> two different importtl options to enable the respective 
> generations. 
OK.
Option 1: current CoClass extended with eventhandlers. Lifetime of Com
object is managed by user.
Option 2: ActiveXContainer (TWinControl) descendant with eventhandlers.
Lifetime of Com object is managed by Component.

Ludo




More information about the fpc-devel mailing list