[Gambas-user] Global variables: now with forms

Benoît Minisini 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
> 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
>

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 ?

-- 
Benoît Minisini
mailto:gambas at ...1...




More information about the User mailing list