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

Dani Santos jose.santos at ...429...
Tue Oct 4 13:01:59 CEST 2005


Hi all.

I'm trying to make a gambas component using gambas (C/C+ is too much to
me).

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?
- ¿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.

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.


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