[Gambas-user] Really dumb question about dialog forms

Fabien Bodard gambas.fr at ...626...
Fri Dec 11 10:08:27 CET 2009


if you do not calm kadaitcha man you gonna get fired from this mailing
list. I have not used it but you are insulting and it is not
necessary. I would simply point out to you that all your intervention
are not necessarily very bright

Also if this is not to answer the question ... It is wiser to shut up!

To Richard:

Static Public sValue as string

Public Sub Run () As Boolean

 Return Not Me.ShowModal ()

End

Public Sub btnOK_Click ()
 sValue = TextBox1.Text
 Me.Close (True)

End

Public Sub btnCancel_Click ()

 Me.Close

End


MyForm.Run if () then

Print MyForm.sValue

endif

In this case sValue is static and can be called as if the class was a module.
This is useful in this case among others.
But for example if you were more instances of the same class (not in
modal mode), and that each instance fesait Appeal sValue ... then you
might not know the result ... sValue is common to all instances. As if
MyClass was a separate module.

That's all and not really a stupid question.

Fabien Bodard




More information about the User mailing list