[Gambas-user] My first question how to access a public sub in another class???
Olivier Coquet
olinux at ...289...
Sat Nov 1 19:43:35 CET 2003
Le Samedi 01 Novembre 2003 17:50, Benoit Minisini a écrit :
> Contrary to VB, forms are not self-instanciable. If the name of your form
> class is "MyForm", it doesn't mean that you have an instance of this form
> with the same name like in VB.
i've understand....
> You must instanciate MyForm, and put the resulting reference in a global
> variable.
>
> For example:
>
> In MyForm:
I put this in Start which is my start class
> STATIC PUBLIC Handle AS MyForm
ok just before any sub, an before the static public sub main
> ...
> Handle = NEW MyForm
ok in the static public sub main()
> MyDialog.Dialog
ok
> PUBLIC SUB ChangeLabel()
> ...
> END
ok
> In MyDialog:
> ...
> MyForm.Handle.ChangeLabel
ok
Start.Handle.ChangeLabel()
it compile with no error
But.....
when I click on the button who launch the
Start.Handle.Changelabel().....nothing !!!!!!!
>
> Is it clearer ?
hummmmmmm
Olivier
More information about the User
mailing list