[Gambas-user] Global variables: now with forms

abid Abidoo.too at ...11...
Wed Sep 11 23:41:30 CEST 2002

Le Mercredi 11 Septembre 2002 12:48, Laszlo Parkanyi a =E9crit :

> 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 valu=

e to

> BirthYear:

> PUBLIC  BirthYear AS Integer

> PUBLIC SUB Birth()

>   BirthYear =3D 1940


> 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 =3D NEW fForm <--- gambas stops here saying unable to load class=



> 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 th=
is no form named "fForm" in your project. Have you defined it ?

Beno=EEt Minisini

And Replace your Class name fForm by FForm because it can make error.

Gambas reconnize the class file when its first letter is an upcase letter.

('humm do you understand what i say ;)'    )

More information about the User mailing list