[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
>

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


--=20
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.

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




More information about the User mailing list