[Gambas-user] Developing a gambas component using gambas.

Dani Santos jose.santos at ...429...
Mon Oct 10 08:40:28 CEST 2005


Thanks Benoit. I thought that the creation of gambas-based components
was more dynamic.

The component I am developing will reproduce one ActiveX Component that
I used in my VB programmer days to easy the development of the
applications but I'm not sure if it will be useful for other.

I think I will follow programming my app without that component but I
will code all the logic of the component into a class so it will be easy
to create the component if people find it useful.

Regards.




El mié, 05-10-2005 a las 21:45 +0200, Benoit Minisini escribió:
> On Tuesday 04 October 2005 13:01, Dani Santos wrote:
> > Hi all.
> 
> Hi,
> 
> >
> > I'm trying to make a gambas component using gambas (C/C+ is too much to
> > me).
> 
> So you should write this mail on the devel mailing-list...
> 
> >
> > I followed J.L. Redrejo advices and donloaded the gambas-gb-form source
> > code to see how is it built. I have made several progress but I've got
> > some questions to make:
> >
> > - ¿How do I asign the icon that is shown in the gambas-toolbox to my
> > gambas component?
> 
> The icons are hard-coded in the IDE at the moment. They should be put outside, 
> in a directory like /usr/share/gambas2/controls for example.
> 
> > - ¿How can I have a preview of the control I'm making in design-time? I
> > mean with this that I only see a slashed rectangle, but I don't see the
> > components it is made with. For instance, if I use the gb.form component
> > in a application and I put a ColorChooser component in a form, I can see
> > how it is perfectly with all it's controls, but not so with my
> > component.
> 
> You can see a preview only if the IDE uses the component the control belongs 
> to. Otherwise, you only see a dashed frame. So if your component is not 
> gb.qt, gb.form or gb.qt.ext, you will never see it!
> 
> I'm thinking about a way to specify a standard gb.qt control for drawing the 
> real control, with a "_DrawWith" property or something like that.
> 
> >
> > Finally, this is the script I use to add my component to the list of
> > components of gambas. It's only for the test phase. ¿Is it correct? ¿Is
> > there a betterway?
> > daniel at ...1154...:~/srcGambas/gb.dycontrols$ cat instala-componente.sh
> > #!/bin/sh
> >
> > case $1 in
> >    -a)
> >       cp -vf gb.dycontrols/gb.dycontrols.* /usr/lib/gambas2
> >       chmod 644 /usr/lib/gambas2/gb.dycontrols.component
> >       chmod 755 /usr/lib/gambas2/gb.dycontrols.gambas
> >       cp -vf
> > gb.dycontrols/.info /usr/share/gambas2/info/gb.dycontrols.info
> >       cp -vf
> > gb.dycontrols/.list /usr/share/gambas2/info/gb.dycontrols.list
> >       break;;
> >    -d)
> >       rm -vf /usr/lib/gambas2/gb.dycontrols.component
> >       rm -vf /usr/lib/gambas2/gb.dycontrols.gambas
> >       rm -vf /usr/share/gambas2/info/gb.dycontrols.info
> >       rm -vf /usr/share/gambas2/info/gb.dycontrols.list
> >       break;;
> > esac
> >
> > NOTES:
> > - You must be logged as root to use the script:
> > - ./instala-componente.sh -a -> Installs the component.
> > - ./instala-componente.sh -d -> Removes the component.
> >
> 
> You can't do that. Components written in Gambas must be inserted into the 
> 'comp' directory inside the source tree, and you must update the ORDER file 
> in it, to tell which order must be used when compiling these components.
> 
> So when your component is finished, send it me and I will add it into the main 
> source tree. Like other components written in C/C++.
> 
> I didn't have the time to document all that yet... Sorry :-)
> 
> >
> > Regards.
> 
> Regards,
> 
-- 
José Daniel Santos Delgado
Programador del IESO Quercus (Malpartida de Plasencia)
http://iesoquercus.juntaextremadura.net/dani/
Tfno: 927010850         Fax: 927010851





More information about the User mailing list