[Vala] bind_property BindingTransformFunc



Hi guys,
I have to follwing code:

var check_button = ... make instance of Gtk.CheckButton

var my_combobox = ... make instance of Gtk.ComboBox


check_button.bind_property(
                            "active",
                            my_combobox, "sensitive",
                            BindingFlags.INVERT_BOOLEAN,
                            (binding, source_value, target_value)=>{
                                if(source_value == true){
                                    print("\n I get here");
                                    my_combobox.active_id =
"TSS_SECRET_MODE_SHA1";
                                }

                                return true;
                            }
            );

The problem is, that my_combobox doesn't become sensitive,
if I de-activate the check_button. Why?

The active_id is chosen correctly.

Thanks in advance.

Regards

David


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