Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-19044

Windows: Accessing a sliders value always returns 0

    Details

    • Type: Bug
    • Status: Closed
    • Priority: None
    • Resolution: Fixed
    • Affects Version/s: Release 4.1.0
    • Fix Version/s: Release 4.1.0
    • Component/s: Windows
    • Labels:
    • Environment:

      Windows 8.1
      Ti CLI: 4.1.0-dev
      Ti SDK: 4.1.0.v20150617152826
      Lumia 928: 8.1
      Windows Phone emulator 8-1-1

    • Story Points:
      5
    • Sprint:
      2015 Sprint 13 Windows

      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

        Attachments

          Activity

            People

            • Assignee:
              cwilliams Christopher Williams
              Reporter:
              eharris Ewan Harris
              Reviewer:
              Dawson Toth
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-20006
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code