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

iOS: Ti.UI.IOS.Stepper.value does not default to correct value

    Details

    • Type: Bug
    • Status: Closed
    • Priority: None
    • Resolution: Fixed
    • Affects Version/s: Release 5.4.0
    • Fix Version/s: Release 6.0.0
    • Component/s: iOS
    • Labels:
    • Environment:

      MacOS 10.11.5 (15F31a)
      Ti SDK 5.4.0.v20160801022303
      Appc NPM 4.2.7
      Appc CLI 5.4.0-37
      Alloy 1.9.1
      Xcode 7.3.1 (7D1014)

      Description

      The default value for Ti.UI.IOS.Stepper.value is null, when it should be 0 according to: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIStepper_Class/index.html#//apple_ref/occ/instp/UIStepper/value

      Steps to Reproduce Issue:
      1. Create a new Alloy project
      2. Use the below code to demonstrate the issue
      3. Run the project and click on "OK"

      Actual Results
      The value is output as null

      Expected Results
      The value is output as 0

      Notes
      This impacts trying to decrement the stepper on first click. Trying to increment the stepper sets it to the step value.

      Code:
      index.xml

      <Alloy>
          <Window class="container">
              <Stepper id="stepper" onClick="doClick" 
                   top="30" tintColor="green" steps ="3" />
              <Button onClick="btnClick">OK</Button>
          </Window>
      </Alloy>
      

      index.js

      function doClick(e) {
          Ti.API.info($.stepper.value);
      }
       
      function btnClick(e) {
          Ti.API.info($.stepper.value);
      }
       
      $.index.open();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                apetkov Angel Petkov
                Reporter:
                ewieber Eric Wieber
                Reviewer:
                Hans Knöchel
                Tester:
                Harry Bryant
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Source Code