[Gambas-user] Global variables: now with forms

Laszlo Parkanyi parka at ...15...
Wed Sep 11 12:48:33 CEST 2002


Hi Benoit,

I  gotcha. I see the same applies to subs/functions. Sticking to the example 
you gave I tried to call a sub placed in  MGlobal to add a value to 
BirthYear:

PUBLIC  BirthYear AS Integer

PUBLIC SUB Birth()
  
  BirthYear = 1940
  
END

Calling this sub from MMain Main:
   MGlobal.Birth    
  PRINT "BirthYear is"; MGlobal.BirthYear

This works just fine.

I may be stupid as I failed to make a Form on which to present the retrieved 
BirthYear (I miss some of the basics). Putting in PUBLIC SUB MAIN():

 DIM hForm as Form
 hForm = NEW fForm <--- gambas stops here saying unable to load class file

Now there is another question: if a Form is present that should be the 
startup class?

Laszlo
  




More information about the User mailing list