On Mon, 2010-11-29 at 10:34 +0100, Mattias Gaertner wrote:
> On Mon, 29 Nov 2010 10:21:07 +0100
> Joost van der Sluis <[email protected]> wrote:
> 
> > Hi all,
> > 
> > Is it possible to add a 'new module' option to the ide which has by
> > default some components on it?
> > 
> > With a TFileDescPascalUnitWithResource, it is possible to add a new
> > module type, but I can't find out a way to add some components on it by
> > default. (I could add the definitions to the code, offcourse, but how to
> > add them to the resource?)
> 
> You can specify the lfm. Override the method GetResourceSource.

Thanks. It has a bug, though. If I use it to generate something else
then a form, using a designer. It still handles the component/resource
as if it was a form. 

That's because CreateRawComponentFromStream is called for the just
generated resource. Which assumes a form. CreateNewForm, on the other
hand, handles the non-lcl-component right. (CreateNewForm is used when
there's no resource-content given)

Shall I create a bug-report?

Joost.




--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to