Results 1 to 3 of 3
  1.    #1  
    Hello,

    I want to update the slider value. I use this code, but it doesn't work ...

    updateSliderValue: function(newValue) {
    this.model.value = .75;
    this.controller.modelChanged(this.model);
    }
    here's my setup function :

    // Sliders par2 ------------------------------------
    var attributes = {
    property: 'value',
    maxValue: 60,
    minValue: 0,
    updateInterval : 0.2
    };
    this.model = {
    value: 30
    };
    this.controller.setupWidget('sliderpar2', attributes, this.model);
    this.controller.listen('sliderpar2',Mojo.Event.propertyChange, this.propertyChangedpar2.bind(this));
    Can you help me ?
  2. #3  
    I'm pretty sure your code to change and update is right, however, I'm not positive about your increments. I think I remember reading the slider only incrementing in whole numbers... And even if it does support decimals, you increment in 0.2, but your value is 0.75. Maybe try 0.8 (an increment that falls within the 0.2 steps. If that doesn't work, multiply everything by 10 to get whole numbers and try again.

Posting Permissions