[Gambas-user] My first question how to access a public sub in another class???
Olivier Coquet
olinux at ...289...
Sat Nov 1 19:11:44 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.
>
> You must instanciate MyForm, and put the resulting reference in a global
> variable.
>
> For example:
>
> In MyForm:
>
> STATIC PUBLIC Handle AS MyForm
> ...
> Handle = NEW MyForm
> ...
> MyDialog.Dialog
> ...
> PUBLIC SUB ChangeLabel()
> ...
> END
>
> In MyDialog:
> ...
> MyForm.Handle.ChangeLabel
> ...
>
> Is it clearer ?
heuuuuuu...yes but In PARIS at this time, we are drinking vine for Halloween
and the vine is not a garanty ao clarity of my spirit :=)
I re-read this tomorow and I try to understant .....
Thanks for answer.
PS: just a question, in Gambas when i start MyForm, I found NoWhere to
instance it in static mode, all is automatic (i think).
Regards of France
Olivier
More information about the User
mailing list