[Lazarus] New unit with resource with some components on it by default
Joost van der Sluis
joost at cnoc.nl
Tue Nov 30 15:10:04 CET 2010
On Tue, 2010-11-30 at 13:29 +0100, Mattias Gaertner wrote:
> On Tue, 30 Nov 2010 13:15:19 +0100
> Joost van der Sluis <joost at cnoc.nl> wrote:
> > 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 <joost at cnoc.nl> 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?
> Yes, I need an example for testing.
Done. I didn't add a real example, but the real case I'm having problems
with with webdesign. So you have to use fppkg to install the 'example'.
More information about the Lazarus