2 Replies Latest reply: Apr 10, 2012 12:56 AM by Pun4kuono RSS

    NumericStepper problem with negative minimum and desimals on stepSize

    Pun4kuono

      I'm experiensing a minor problem with NumericStepper. When I have this:

       

      <s:NumericStepper

                                    maximum="8"

                                    minimum="-8"

                                    />

       

      This works fine. Default stepSize is one so the values will be between just fine. But when I add a stepSize that has desimals in it the values are off.

       

      <s:NumericStepper

        maximum="8"

        minimum="-8"

        stepSize="0.1"

        />


      The first step in this will be 0,09999999999999964. Then again if I have

       

      <s:NumericStepper

                                    maximum="8"

                                    stepSize="0.1"

                                    />

       

      That works fine again. For some reason it doesn't like the situation when the minimum is negative and stepSize has decimals in it. Does someone know how to fix this or is there a some kind of workaround? I think this might actually be a bug in the component. The problem is different from this http://forums.adobe.com/message/3596809#3596809 cause having those two functions didn't help for this. We'd actually need a situation for the stepSize being 0.01 and the minimum can have negative values in it.

       

      Any help would be appreciated.