[fpc-devel]TDataModul

Sebastian Günther sguenther at gmx.de
Sat Dec 28 18:20:16 CET 2002


Michael.VanCanneyt at wisa.be schrieb:
> 
> In that case the name 'TDataModule' is not really representative.
> TComponentModule might be a better name. And then create a TDataModule
> descendent.

And what should be the difference between these two classes?


> As far as I can see, we need a function that returns a stream which contains
> the component data. All the rest can be handled in a 'global' way; Only the
> instancing of the stream is specific to the kind of streaming used.
> 
> For lazarus, this would probably be a memory stream which is instantiated
> from the lazarus resources. For fpgui, this would be a file stream which
> points to the .dfm file. A combined approach is possible, of course.
> 
> So, basically we need a callback which returns the appropriate stream to
> instantiate the component ? Do I undertand this correct ?

No, we need exactly this. I propose to add a callback similar to 
FindGlobalComponent etc.

type
   TReadComponentCallback = function(const AClassName: String; AInstance:
     TComponent): Boolean;
var
   ReadComponent: TReadComponentCallback;

(just a proposal)


And, you didn't answer this yet :) : Should we move the folders unit to 
the FCL or not? I think it will be quite useful for different things


- Sebastian





More information about the fpc-devel mailing list