I’m trying to bind two sliders from two separate qooxdoo classes and am looking for an example. I was able to get the desired effect in the playground here:
// create two sliders
var slider1 = new qx.ui.form.Slider().set({minWidth:400});
var slider2 = new qx.ui.form.Slider().set({minWidth:400});
// create a controller and use the first slider as a model
var controller = new qx.data.controller.Object(slider1);
var controller2 = new qx.data.controller.Object(slider2);
// add the second slider as a target
controller.addTarget(slider2, "value", "value");
controller2.addTarget(slider1, "value", "value");
I’m pretty sure to do this I would have to go through the properties object, but first wanted to make sure that I’m on the right track so far with the logic. Thanks for any suggestions!
You don’t need to use the controller. Every qooxdoo objects has the bind method, which can be used in both directions:
Thats basically it: http://tinyurl.com/7xy9mmv