[Gambas-user] is it possible to use component in a module?

Fabien Bodard gambas.fr at ...626...
Mon Nov 26 08:51:34 CET 2007


Le Monday 26 November 2007 04:04:28 Dominique SIMONART, vous avez écrit :
> Hi everybody,
> I don't understand what is wrong with that:
> Gambas 1.9.91 OpenSuse 10.3 with KDE
> I create a new graphical project (QT)
> I put a gridView on the form FMain -> GridView1 OK
> I create a new module (Module1) where I write this:
>
> PUBLIC SUB test()
>   fmain.GridView1.Columns = 2 (GridView1 is correctly proposed when I
> type the dot after FMain)
>   fmain.GridView1.Rows = 2
> END
>  and finally in the FMain I add this:
>
> PUBLIC SUB Form_Open()
>   module1.test()
> END
>
> When I execute this I get the message:
> Unknown symbol 'GridView1' in class 'FMain'
>
> What is wrong?
>
Nothing in your code, just a bad habits from vb...

In vb you use the form controls from everywhere... In gambas like in C or java 
you can't by default...

You can by opening the project properties (ctrl+P) and selecting the 
option 'control are public'





> Thanks for your help
> Dominique Simonart
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user






More information about the User mailing list