[Vala] Builer connect signals




I have this code :

    public class TestWindow : GLib.Object
    {

        public TestWindow ()
        {
            Builder builder = new Builder();
            
            try
            {
                builder.add_from_file ("test.ui");
            }
            catch (Error exc) 
            {
                
            }
            
            builder.connect_signals (this);
            
        }
        
        [CCode (instance_pos = -1)]
        public void on_testButton_activate(Button sender)
        {
           //some code
        }

    }

I create a GtkBuilder project file for gtk 2.16 with glade2.

The signal code doesn't work, it loads test window with button but code for signal activate doesn't run.

_________________________________________________________________
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]