Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19044] Windows: Accessing a sliders value always returns 0

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2015-06-22T16:38:16.000+0000
Affected Version/sRelease 4.1.0
Fix Version/sRelease 4.1.0
ComponentsWindows
Labelsqe-4.1.0
ReporterEwan Harris
AssigneeChristopher Williams
Created2015-06-18T22:31:21.000+0000
Updated2015-06-24T20:46:30.000+0000

Description

Description

When accessing a sliders value the value returned is always 0
var win = Ti.UI.createWindow({backgroundColor: 'red'});

var lbl = Ti.UI.createLabel({
    text: 'Value is ',
    color: 'black',
    width: 150
});

var slider = Titanium.UI.createSlider({
    top: 80,
    width: '80%'
});


slider.addEventListener('change', function(e) {
        lbl.text = 'Value is ' + e.value;
});

lbl.addEventListener('click', function(){
    alert(slider.value);
});


win.add(lbl);
win.add(slider);
win.open();

Steps To Reproduce

1. Add the above code to an existing app.js 2. Build the device or emulator 3. Move the slider 4. Tap the label

Actual Result

The value returned is 0

Expected Result

The value returned should match the label displaying the value

Comments

  1. Lokesh Choudhary 2015-06-24

    Verified the fix. We get the appropriate slider value. Closing. Environment: Appc Studio: 4.1.0.201506221807 Ti SDK: 4.1.0.v20150624102755 Ti CLI: 4.0.1 Alloy: 1.6.2 Windows: 8.1 Enterprise 64-bit APPC NPM: 4.1.0-1 APPC CLI: 4.1.0-3 Device: Nokia Lumia 928 - Windows Phone 8.1 Windows emulator : 8.1

JSON Source