[Gambas-user] Global variables: now with forms
gambas at ...1...
Wed Sep 11 18:25:07 CEST 2002
Le Mercredi 11 Septembre 2002 12:48, Laszlo Parkanyi a écrit :
> 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
> PUBLIC BirthYear AS Integer
> PUBLIC SUB Birth()
> BirthYear = 1940
> Calling this sub from MMain Main:
> 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
> 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?
Your next problem is not very clear :-)
If Gambas says "unable to load class file" in that case, it means that there
is no form named "fForm" in your project. Have you defined it ?
mailto:gambas at ...1...
More information about the User