Re: [Vala] [ANNOUNCE] Libgee 0.5.0 - GObject collection library

2009-09-28 Thread Ildar Mulyukov
On 29.09.2009 12:42:40, Jan Hudec wrote: The GLib.TestCase.new was rebound in Vala 0.7.7 with different order of arguments. > Compilation failed: 1 error(s), 0 warning(s) > > My version is vala-0.7.6-alt2 You need Vala 0.7.7 to compile Libgee 0.5.0. I think this incompatibility is not the

Re: [Vala] [ANNOUNCE] Libgee 0.5.0 - GObject collection library

2009-09-28 Thread Jan Hudec
On Tue, Sep 29, 2009 at 08:53:20 +0600, Ildar Mulyukov wrote: > On 29.09.2009 01:10:20, Didier 'Ptitjes' wrote: > >We are very pleased to announce version 0.5.0 of Libgee, the > >GObject collection library. > > Hi! > ... > make[2]: Leaving directory `/tmp/libgee/gee' > Making all in tests > make[2

Re: [Vala] [ANNOUNCE] Libgee 0.5.0 - GObject collection library

2009-09-28 Thread Ildar Mulyukov
On 29.09.2009 01:10:20, Didier 'Ptitjes' wrote: We are very pleased to announce version 0.5.0 of Libgee, the GObject collection library. Hi! ... make[2]: Leaving directory `/tmp/libgee/gee' Making all in tests make[2]: Entering directory `/tmp/libgee/tests' /usr/bin/valac -C --basedir .. --vap

[Vala] [PATCH] Vala binding for Graphviz library

2009-09-28 Thread Martin Olsson
Hi, Here is a Vala binding for the graphviz library. Hopefully it can be included in Vala GIT so that others can benefit from it as well. If anyone wants to try it out there is small code sample included as a comment at the top of the .vapi file. https://bugzilla.gnome.org/show_bug.cgi?id=596656

[Vala] [ANNOUNCE] Libgee 0.5.0 - GObject collection library

2009-09-28 Thread Didier 'Ptitjes'
We are very pleased to announce version 0.5.0 of Libgee, the GObject collection library. Libgee 0.5.0 is now available for download at: http://download.gnome.org/sources/libgee/0.5/ Also please note that now Libgee has its own mailing-list http://mail.gnome.org/mailman/listinfo/libgee-li

Re: [Vala] Vala 0.7.7: unsupported lvalue in postfix expression

2009-09-28 Thread Michael B. Trausch
On Mon, 2009-09-28 at 10:28 -0700, Jim Nelson wrote: > When I build with the new 0.7.7 compiler I see these sorts of errors: > > error: unsupported lvalue in postfix expression > > for these sorts of lines: > > a[ctr]++; (Sorry Jim, for the dup. Evolution, me, and the Reply-to-All button do n

Re: [Vala] Problem with switch statment

2009-09-28 Thread Nicolas
Ok i filled a bug: https://bugzilla.gnome.org/show_bug.cgi?id=596591 Nicolas. ___ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

[Vala] Vala 0.7.7: unsupported lvalue in postfix expression

2009-09-28 Thread Jim Nelson
Hello, When I build with the new 0.7.7 compiler I see these sorts of errors: error: unsupported lvalue in postfix expression for these sorts of lines: a[ctr]++; where a is (for example): int[] a = new int[3]; The solution seems to be to replace the postfix with the assignment infix operator:

Re: [Vala] Problem with switch statment

2009-09-28 Thread Jamie McCracken
On Mon, 2009-09-28 at 14:18 +0200, Xavier Bestel wrote: > On Mon, 2009-09-28 at 13:59 +0200, Nicolas wrote: > > "Feel free to file a bug" > > Yes but i don't know what to say to describe the bug ! > > Something like "Genie sometimes introduces a spurious break statement in > switch", and in the bo

Re: [Vala] Final / Sealed classes in Vala

2009-09-28 Thread Treviño
Jan Hudec wrote: > On Mon, Sep 28, 2009 at 12:34:48 +0200, Jürg Billeter wrote: > > However, `sealed' is not meant for "static classes", that concept is not > > encouraged in Vala as we support namespace methods. > > C# documentation explicitly states, that combining static and sealed is > forbidd

Re: [Vala] Final / Sealed classes in Vala

2009-09-28 Thread Didier 'Ptitjes'
Hi Jan, Jan Hudec wrote: Just like my earlier example with inheriting string, similar reasons apply to inheriting concrete collection classes. For example a collection of options would make perfect sense to be a collection plus special constructor or initialization method to load it from a file

[Vala] wrong code generated with thread function

2009-09-28 Thread Colombo, Alberto
Hello, I'm using valac 0.7.7 and the following small example is compiled into erroneous C code: class BrokenThread { void *a_method() { while (true) { Thread.usleep(100); }

[Vala] [ANNOUNCE] Vala Toys for gEdit 0.6.0

2009-09-28 Thread Andrea Del Signore
Another week, another great vala release and now the new vtg 0.6.0 is ready: Vala Toys for gEdit - "Following the compiler?" can be downloaded here: http://vtg.googlecode.com/files/vtg-0.6.0.tar.bz2 This version supports the new valac 0.7.7. NEWS for version 0.6.0 =

Re: [Vala] Problem with switch statment

2009-09-28 Thread Xavier Bestel
On Mon, 2009-09-28 at 13:59 +0200, Nicolas wrote: > "Feel free to file a bug" > Yes but i don't know what to say to describe the bug ! Something like "Genie sometimes introduces a spurious break statement in switch", and in the body of the bug you could paste Jürg's email. Xav

Re: [Vala] Problem with switch statment

2009-09-28 Thread Nicolas
"Feel free to file a bug" Yes but i don't know what to say to describe the bug ! Nicolas. You can do this to avoid the warning, however, this should certainly be fixed in the compiler at some point. Feel free to file a bug. Jürg ___ Vala-li

Re: [Vala] Problem with switch statment

2009-09-28 Thread Jürg Billeter
Hi, On Mon, 2009-09-28 at 13:41 +0200, Nicolas wrote: > I found a simple solution to avoid this warnings. > Rather than using a "return", I use a bool and at the end of the > procedure, I return the bool. > > Do you think this is a good solution? You can do this to avoid the warning, however, t

Re: [Vala] Problem with switch statment

2009-09-28 Thread Nicolas
Hi, Thanks Jürg for your response. I found a simple solution to avoid this warnings. Rather than using a "return", I use a bool and at the end of the procedure, I return the bool. Do you think this is a good solution? def private on_button_press(sender : TreeView, eb : Gdk.EventButton) :

Re: [Vala] [RFC, PATCH] add async keyword to vapigen

2009-09-28 Thread Jan Hudec
On Sun, Sep 27, 2009 at 22:32:48 +0200, Jürg Billeter wrote: > On Fri, 2009-09-25 at 09:23 +0200, Jan Hudec wrote: > > On Thu, Sep 24, 2009 at 22:21:36 +0200, Philipp Zabel wrote: > > > Or would it be better to make the parser recognize asynchronous > > > functions that don't end in _async? > > >

Re: [Vala] Final / Sealed classes in Vala

2009-09-28 Thread Jan Hudec
On Mon, Sep 28, 2009 at 12:34:48 +0200, Jürg Billeter wrote: > However, `sealed' is not meant for "static classes", that concept is not > encouraged in Vala as we support namespace methods. C# documentation explicitly states, that combining static and sealed is forbidden on classes, for precisely

Re: [Vala] Final / Sealed classes in Vala

2009-09-28 Thread Jan Hudec
On Sat, Sep 26, 2009 at 17:27:45 +0200, Didier 'Ptitjes' wrote: > Michael B. Trausch wrote: > >The idea of a sealed/final class can be used to mean a few things: > >... > > To follow Phil with use cases, Libgee would be in great need for > final classes and methods. > > As an example, we would li

Re: [Vala] Final / Sealed classes in Vala

2009-09-28 Thread Jürg Billeter
On Tue, 2009-09-22 at 06:40 +0200, Marco Trevisan (Treviño) wrote: > Is it possible to define both in VAPIs and in a vala code a class which > can not be extended? > > I mean something like "final" does for Java and "sealed" for C#... It's planned to introduce `sealed' in a future version on both

Re: [Vala] Final / Sealed classes in Vala

2009-09-28 Thread Didier 'Ptitjes'
Arto Karppinen wrote: I still think that these kind of problems can be avoided in Vala code by carefully selecting what and when to virtualize. Once again to take the example of Gee. We needed to provide default behaviour for add_all, remove_all, retain_all, ... methods, but wanted concrete i

Re: [Vala] Problem with switch statment

2009-09-28 Thread Jürg Billeter
On Sun, 2009-09-27 at 20:23 +0200, Nicolas wrote: > My function work but i have this message when building: > > treeview.gs:143.9-158.13: warning: unreachable code detected I assume the reason for this is that the Genie parser just always appends a break statement even if you have, for example, a

Re: [Vala] Problem with switch statment

2009-09-28 Thread Nicolas
Hi Jamie, Thanks again for your response. I tried to change my code like this: def private on_button_press(sender : TreeView, eb : Gdk.EventButton) : bool column : Gtk.TreeViewColumn cell_x, cell_y : int path : Gtk.TreePath x : int x = (int)eb.x y :