2009/12/11 Fabien Bodard <gambas...@gmail.com>: > Static Public sValue as string > > Public Sub Run () As Boolean
I knew there was a reason not to use your method and to make the recommendation I did. If you tested that code then I presume you did it in gb3 and not gb2. Gambas 2 either crashes out with a SIG 11, or in some unfathomable instances, when the form is closed, it drops into debug and complains about the pending destruction of a public static variable. Furthermore if the form is instantiated in a variable of type Form then you cannot access the public static by referencing the variable as a property in the instanced form type variable; the only way to get to the value of the public static is directly from the class itself, like this: DIM ff AS NEW Form1 IF NOT ff.Run() THEN PRINT Form1.sValue ENDIF In short, Fabien, as far as I can tell, the only way to make it work correctly in gb2 is to do it the way I originally said to do it. Of course I'm open to being shown to be wrong. ------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user