> cwyong1 ha scritto: > > Hi all > > i m experimenting with the HelloWorld project and i m confused, pls tell > > me what is wrong here. Thanking you all in advance > > > > This is what i have added to the code > > > > PUBLIC SUB _new() > > > > END > > > > PUBLIC SUB Form_Open() > > DEBUG Form.width > > END > > > > PUBLIC SUB Button1_Click() > > > > DEBUG Form.width > > > > END > > > > When i run the project, debug show this > > FMain.Form_Open.8: 640 > > > > I then resize the window and on clicking the button 1, debug show this > > FMain.Form_Open.8: 640 > > FMain.Button1_Click.13: 640 > > > > So, my question is how come the width is still showing 640 when the width > > have increased. > > Perhaps you should use "FMain.width", or "ME.Width" and not "Form.width". > > "Form" is not an instance of a class, but a class name. I don't know > what gambas does in this case (it should give a compilation error, I > suppose; what is the sense of querying a field of a non-instantiated > class?). > > Regards, > Doriano >
Form is "auto-instanciable", so by querying Form.Width, you are querying the width of an internal automatically created Form object. Regards, -- Benoît Minisini ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user