[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [Vala] Usage of Static classes
- From: "Phil Housley" <undeconstructed gmail com>
- To: "Sudharshan S" <sudharsh gmail com>
- Cc: vala-list gnome org
- Subject: Re: [Vala] Usage of Static classes
- Date: Mon, 2 Jun 2008 20:42:52 +0100
Static classes are deprecated in new Vala versions, instead you can
use nested namespaces to achieve the same thing.
2008/6/2 Sudharshan S <sudharsh gmail com>:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi all,
> First of all I am new to the OOP way of thinking and pretty new to vala.
> So please bear with me as I am still learning things.
> To best of my knowledge static classes are non instantiable and sealed.
>
> But using the 'static' keyword during the class definition barfs when
> compiling.
>
> For example,
>
> public static Foo: GLib.Object {
> ..
> ..
>
>
> generates,
>
> typedef struct (null) FooClass;
> typedef struct (null) FooPrivate;
>
> in say foo.h.
>
> Shouldn't the above lines be absent? or should FooClass be typedef'ed to
> NULL instead of (null). If so, isn't it a trivial bug in the code generator?
>
> Or did I miss the train and should I assume that defining all the
> methods "static" automatically gives me a static class?
> I actually happened to follow the above assumption.
>
> If it matters, I am using the latest svn checkout
>
> Thanks and Regards
> Sudharshan S
> Blog : http://www.sudharsh.wordpress.com
> IRC : Sup3rkiddo @ freenode, gimpnet
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkhES9UACgkQSsRjJNRMc4nugQCfRZROQ3wFAB6xYqyFOIfx8ybg
> svcAn3R5F9ZIlcWOJTlWlmwhwk1N9cae
> =khtY
> -----END PGP SIGNATURE-----
> _______________________________________________
> Vala-list mailing list
> Vala-list gnome org
> http://mail.gnome.org/mailman/listinfo/vala-list
>
--
Phil Housley
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]