[Gambas-user] Static class?!?

Timothy Marshal-Nichols timothy.marshal-nichols at ...247...
Mon Aug 14 19:56:14 CEST 2006




> -----Original Message-----
> From: gambas-user-bounces at lists.sourceforge.net
> [mailto:gambas-user-bounces at lists.sourceforge.net]On Behalf Of Leonardo
> Miliani
> Sent: Monday, 14 August 2006 15:23
> To: mailing list for gambas users
> Subject: [Gambas-user] Static class?!?
>
>
> Is it me or is it a Gambas 1.9.38 bug?
> I cannot create a dynamic class...
> I add a new class to a project and choose the Constructor option. But
> when I declare the new class in a form with NEW Gambas tells me that the
> class is static... but in my class code there is the sub _new()...
>
>
> --
> Ciao.
> Leo
>
> Visita il mio sito personale: www.leonardomiliani.com
> e-mail: leonardo at ...1237...
>


If there are no none static variable then you get this message when you NEW
a class. Gambas forces you to treat it as a STATIC class.

Add this:

  PRIVATE sillyTohaveToAddThis AS Integer

to your class and it will work.

On another thread Benoit seems to like this behaviour. But, as you can see,
it leads to problems.

What do others think?

Thanks

8-{)} Timothy Marshal-Nichols
<mailto: timothy.marshal-nichols at ...247...>






More information about the User mailing list