Thanks Andrea,
it works making "public" both class Foo and the struct Sub.
But, the weirdest thing is that it compiles fine after removing the
ArrayList field.
using Gee;
class Foo : GLib.Object {
struct Sub {
public long initime;
public int duration;
// public ArrayList<string> text;
}
}
In this case it compiles even without making public the class and the
struct.
Any explanation?
2010/8/11 Andrea Del Signore <[email protected]>
> On Wed, 2010-08-11 at 00:35 +0200, [email protected] wrote:
> > /* Foo */
> > using Gee;
> >
> > class Foo : GLib.Object {
> > struct Sub {
> > public long initime;
> > public int duration;
> > public ArrayList<string> text;
> > }
> >
> > }
> >
>
> Hi,
>
> your problem is with the class Foo if you should define it to be public:
>
> /* Foo */
> using Gee;
>
> public class Foo : GLib.Object {
> public struct Sub {
> public long initime;
> public int duration;
> public ArrayList<string> text;
> }
> }
>
> What I don't know is why vala doesn't report an error when compiling
> your example code since you are accessing a private structure.
>
> Is just a vala compiler bug or the default scope of classes and structs
> *is not* private when not specified?
>
> Regards,
> Andrea
>
>
--
Andrés Estévez Costas
Mi Blog: http://andresestevez.blogspot.com
Colaboro en Enxeñería sen Fronteiras Galicia: http://galicia.isf.es
Socio Fundador de: http://www.ghandalf.org
_______________________________________________
vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list