Re: [Vala] Passing a callback function as an argument and connect to activate signal, cannot convert error....

2012-04-27 Thread Axel FILMORE
Thanks Luca, it works great. Marvelous. :) On 27/04/2012 20:36, Luca Bruno wrote: On Fri, Apr 27, 2012 at 7:15 PM, Axel FILMORE > wrote: But I try to add some actions dynamically so I'd like to pass the callback as an argument. What I'm doing wrong

Re: [Vala] Passing a callback function as an argument and connect to activate signal, cannot convert error....

2012-04-27 Thread Luca Bruno
On Fri, Apr 27, 2012 at 7:15 PM, Axel FILMORE wrote: > But I try to add some actions dynamically so I'd like to pass the callback > as an argument. > > What I'm doing wrong ? > Nothing, Vala still does not support passing delegates to signal handlers. You have to use a lambda instead, something l

[Vala] Passing a callback function as an argument and connect to activate signal, cannot convert error....

2012-04-27 Thread Axel FILMORE
Hi there, I try to do the following in Vala without much success : namespace Test { public class Popup { public void create (Callback action_callback) { Gtk.Action action = new Gtk.Action ("", "", "", null); action.activate.connect (action_callback

Re: [Vala] regarding Gtk Builder on Vala

2012-04-27 Thread Andrew Higginson
On 27 April 2012 14:02, D.H. Bahr wrote: > Hello everyone, > > I've suffered a deep disappointment from Vala, and I'm hoping it is > something I failed to do rightly. > > I have an app with a Gtk 3 interface loaded from a gtk builder, but I > get a seg fault on run time. The thing is the same cod

[Vala] regarding Gtk Builder on Vala

2012-04-27 Thread D.H. Bahr
Hello everyone, I've suffered a deep disappointment from Vala, and I'm hoping it is something I failed to do rightly. I have an app with a Gtk 3 interface loaded from a gtk builder, but I get a seg fault on run time. The thing is the same code (and builder xml) (written in Python 2) works smoothl

[Vala] [Bug] Compact class as user data need to be passed as unowned

2012-04-27 Thread Tal Hadad
When I pass lambda method in non-static compact class method block, I get this error: error: duplicating SerializedVbo instance, use unowned variable or explicitly invoke copy method The reason is that the compact class instance is in the user data, but it's not marked as unowned. Vala shell th