[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gambas-user
Subject:    Re: [Gambas-user] is it possible to use component in a module?
From:       Dominique SIMONART <simonart.dominique () wanadoo ! fr>
Date:       2007-11-28 20:25:56
Message-ID: 474DCED4.3090201 () wanadoo ! fr
[Download RAW message or body]

Benoit Minisini a écrit :
> On lundi 26 novembre 2007, Arief Bayu Purwanto wrote:
>   
>> On 11/26/07, Fabien Bodard <gambas.fr@gmail.com> wrote:
>>     
>>> 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'
>>>       
>> Then, I think code completion should be more clever. SOL.
>>     
>
> What do you mean by that?
>
> If the "controls are public" option is checked, then they are visible in the 
> completion list box, otherwise they are not. Doesn't it work like that?
>
>   
Once more, it's my fault ! I said that completion code correctly propose
the GridView1, and this is right anywhere in the FMain class, but in the
module the completion code showed only GridvView (not GridView1)
regards,
Dominique Simonart


-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic