You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by "Pierangelo Mancusi (Created) (JIRA)" <ji...@apache.org> on 2012/02/25 19:51:48 UTC

[jira] [Created] (FLEX-20) The Max value restriction in Spark NumericStepper doesn't work properly

The Max value restriction in Spark NumericStepper doesn't work properly
-----------------------------------------------------------------------

                 Key: FLEX-20
                 URL: https://issues.apache.org/jira/browse/FLEX-20
             Project: Apache Flex
          Issue Type: Bug
          Components: Project Management
         Environment: Apache FlexSDK 4.6 - Adobe FlexSDK 4.6 -  Adobe FlexSDK 4.5
            Reporter: Pierangelo Mancusi
            Assignee: Bertrand Delacretaz
            Priority: Minor


original issue: https://bugs.adobe.com/jira/browse/SDK-31123

here a summary:

Steps to reproduce: 
1.Launch the browser with Numeric stepper. Set the min value as 10 max value as 50. Also set default values as 20. 
2.After launching the broswer clear the default value 20 and focus out from the numeric stepper. It displays "NAN" 
3. Again focus back to the numeric stepper and try to edit 3 digit value (Eg.777). Then foucs out. It doen't restrict to max value i.e"50" as set earlier in 
   step 1. It allows the 3 digit value enetered instead. 
  
 Actual Results: The enetered value will be displayed 
  
  
 Expected Results: It should restrict and display the max values as set in step 1. 
  
  
 Workaround (if any): No Work around. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Re: [jira] [Commented] (FLEX-20) The Max value restriction in Spark NumericStepper doesn't work properly

Posted by Pierangelo Mancusi <pi...@gmail.com>.
ok justin, i will remove the URL leaving only the ticket.
 so it will be : //Restore old vale (issue:
SDK-31123<https://bugs.adobe.com/jira/browse/SDK-31123>
 )



Il giorno 26 febbraio 2012 22:50, Justin Mclean (Commented) (JIRA) <
jira@apache.org> ha scritto:

>
>    [
> https://issues.apache.org/jira/browse/FLEX-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13216943#comment-13216943]
>
> Justin Mclean commented on FLEX-20:
> -----------------------------------
>
> We don't currently have a style guide for code patches yet so for now try
> and code in the same style as surrounding code. I'd suggest something like
> this:
>
> // Restore old value see https://bugs.adobe.com/jira/browse/SDK-31123
> if (isNaN(inputValue))
> {
>        inputValue = value;
> }
>
>
>
>
> > The Max value restriction in Spark NumericStepper doesn't work properly
> > -----------------------------------------------------------------------
> >
> >                 Key: FLEX-20
> >                 URL: https://issues.apache.org/jira/browse/FLEX-20
> >             Project: Apache Flex
> >          Issue Type: Bug
> >          Components: Project Management
> >         Environment: Apache FlexSDK 4.6 - Adobe FlexSDK 4.6 -  Adobe
> FlexSDK 4.5
> >            Reporter: Pierangelo Mancusi
> >            Assignee: Bertrand Delacretaz
> >            Priority: Minor
> >              Labels: patch
> >         Attachments: NumericStepperPatch.txt
> >
> >
> > original issue: https://bugs.adobe.com/jira/browse/SDK-31123
> > here a summary:
> > Steps to reproduce:
> > 1.Launch the browser with Numeric stepper. Set the min value as 10 max
> value as 50. Also set default values as 20.
> > 2.After launching the broswer clear the default value 20 and focus out
> from the numeric stepper. It displays "NAN"
> > 3. Again focus back to the numeric stepper and try to edit 3 digit value
> (Eg.777). Then foucs out. It doen't restrict to max value i.e"50" as set
> earlier in
> >    step 1. It allows the 3 digit value enetered instead.
> >
> >  Actual Results: The enetered value will be displayed
> >
> >
> >  Expected Results: It should restrict and display the max values as set
> in step 1.
> >
> >
> >  Workaround (if any): No Work around.
>
> --
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA
> administrators:
> https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>

[jira] [Commented] (FLEX-20) The Max value restriction in Spark NumericStepper doesn't work properly

Posted by "Haykel Ben Jemia (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLEX-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13217135#comment-13217135 ] 

Haykel Ben Jemia commented on FLEX-20:
--------------------------------------

Why should the numeric stepper allow for NaN? IMHO it should only allow numbers to be entered, is there a reason for allowing NaN?
                
> The Max value restriction in Spark NumericStepper doesn't work properly
> -----------------------------------------------------------------------
>
>                 Key: FLEX-20
>                 URL: https://issues.apache.org/jira/browse/FLEX-20
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Project Management
>         Environment: Apache FlexSDK 4.6 - Adobe FlexSDK 4.6 -  Adobe FlexSDK 4.5
>            Reporter: Pierangelo Mancusi
>            Assignee: Bertrand Delacretaz
>            Priority: Minor
>              Labels: patch
>         Attachments: NumericStepperPatch.txt
>
>
> original issue: https://bugs.adobe.com/jira/browse/SDK-31123
> here a summary:
> Steps to reproduce: 
> 1.Launch the browser with Numeric stepper. Set the min value as 10 max value as 50. Also set default values as 20. 
> 2.After launching the broswer clear the default value 20 and focus out from the numeric stepper. It displays "NAN" 
> 3. Again focus back to the numeric stepper and try to edit 3 digit value (Eg.777). Then foucs out. It doen't restrict to max value i.e"50" as set earlier in 
>    step 1. It allows the 3 digit value enetered instead. 
>   
>  Actual Results: The enetered value will be displayed 
>   
>   
>  Expected Results: It should restrict and display the max values as set in step 1. 
>   
>   
>  Workaround (if any): No Work around. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (FLEX-20) The Max value restriction in Spark NumericStepper doesn't work properly

Posted by "Pierangelo Mancusi (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLEX-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13219584#comment-13219584 ] 

Pierangelo Mancusi edited comment on FLEX-20 at 3/1/12 7:16 AM:
----------------------------------------------------------------

Hi John,
fist of all, nice to meet you.

let's start the answer:
your comment  to the  issue at Adobe site is wrong, cause it's based on a bad interpretation of the issue.
Of course, before i started to work on this, i tested your solution but it was wrong. (i compiled the SDK with your suggestion...btw thanks Justin for your  good work )

When the component is created passing nothing to the "value" property, it inherits the property "value=0" from the Range.as class (if you assign a numeber, the component takes it obviously).

when we change the value in the component, the TextInput.text is passed to the NumberFormatter.parseNumber(parseString:String) ( see line 796 - NumericStepper.as)

This last help method returns NaN and the property lastOperationStatus of NumberFormatter class  is set first to "illegalArgumentError" and then to "parseError".

Here is the mistake and the question is: When we can insert a "NaN" value in the NumericStepper's TextInput, which accepts  only strings rapresenting a number?...never i say.

so when  NumericStepper's  inputValue is NaN, after all possible assignement in that method,  i restore the last valid value.

that is the fix.

Also i 100% agree with you  when you say that the comparison at line 791 of the NumericStepper class  is rather questionable.
Never seen an if like that :)

                
      was (Author: pierangelo):
    Hi John,
fist of all, nice to meet you.

let's start the answer:
your comment  to the  issue at Adobe site is wrong, cause it's based on a bad interpretation of the issue.
Of course, before i started to work on this, i tested your solution but it was wrong. (i compiled the SDK with your suggestion...btw thanks Justin for your  good work )

When the component is created passing nothing to the "value" property, it inherits the property "value=0" from the Range.as class (if you assign a numeber, the component takes it obviously).

when we change the value in the component, the TextInput.text is passed to the NumberFormatter.parseNumber(parseString:String) ( see line 796 - NumericStepper.as)

This last help method return NaN and the property lastOperationStatus of NumberFormatter class  is set first to "illegalArgumentError" and then to "parseError".

Here is the mistake and the question is: When we can insert a "NaN" value in the NumericStepper's TextInput, which accepts  only strings rapresenting a number?...never i say.

so when  NumericSteppes's  inputValue is NaN, after all possible assignement in that method,  i restore the last valid value.

that is the fix.

Also i 100% agree with you  when you say that the comparison at line 791 of the NumericStepper class  is rather questionable.
Never seen an if like that :)

                  
> The Max value restriction in Spark NumericStepper doesn't work properly
> -----------------------------------------------------------------------
>
>                 Key: FLEX-20
>                 URL: https://issues.apache.org/jira/browse/FLEX-20
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Project Management
>         Environment: Apache FlexSDK 4.6 - Adobe FlexSDK 4.6 -  Adobe FlexSDK 4.5
>            Reporter: Pierangelo Mancusi
>            Assignee: Bertrand Delacretaz
>            Priority: Minor
>              Labels: patch
>         Attachments: NumericStepperPatch.txt
>
>
> original issue: https://bugs.adobe.com/jira/browse/SDK-31123
> here a summary:
> Steps to reproduce: 
> 1.Launch the browser with Numeric stepper. Set the min value as 10 max value as 50. Also set default values as 20. 
> 2.After launching the broswer clear the default value 20 and focus out from the numeric stepper. It displays "NAN" 
> 3. Again focus back to the numeric stepper and try to edit 3 digit value (Eg.777). Then foucs out. It doen't restrict to max value i.e"50" as set earlier in 
>    step 1. It allows the 3 digit value enetered instead. 
>   
>  Actual Results: The enetered value will be displayed 
>   
>   
>  Expected Results: It should restrict and display the max values as set in step 1. 
>   
>   
>  Workaround (if any): No Work around. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FLEX-20) The Max value restriction in Spark NumericStepper doesn't work properly

Posted by "John Fletcher (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLEX-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13217219#comment-13217219 ] 

John Fletcher commented on FLEX-20:
-----------------------------------

Haykel, I could give you some reasons, but I won't because I don't want to sidetrack since the question is out of scope of this issue. NaN is a supported feature in NumericStepper and actually works perfectly except when you attempt to replace it with a three-digit number. This issue is to commit a bugfix so that it works properly in all cases and that is what we should do here.

Removing support for NaN in NumericStepper is a valid feature request which we could consider for the next version of Flex. If you want to open a new issue for that, please paste in the link here and I'll give you my thoughts over on that issue.
                
> The Max value restriction in Spark NumericStepper doesn't work properly
> -----------------------------------------------------------------------
>
>                 Key: FLEX-20
>                 URL: https://issues.apache.org/jira/browse/FLEX-20
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Project Management
>         Environment: Apache FlexSDK 4.6 - Adobe FlexSDK 4.6 -  Adobe FlexSDK 4.5
>            Reporter: Pierangelo Mancusi
>            Assignee: Bertrand Delacretaz
>            Priority: Minor
>              Labels: patch
>         Attachments: NumericStepperPatch.txt
>
>
> original issue: https://bugs.adobe.com/jira/browse/SDK-31123
> here a summary:
> Steps to reproduce: 
> 1.Launch the browser with Numeric stepper. Set the min value as 10 max value as 50. Also set default values as 20. 
> 2.After launching the broswer clear the default value 20 and focus out from the numeric stepper. It displays "NAN" 
> 3. Again focus back to the numeric stepper and try to edit 3 digit value (Eg.777). Then foucs out. It doen't restrict to max value i.e"50" as set earlier in 
>    step 1. It allows the 3 digit value enetered instead. 
>   
>  Actual Results: The enetered value will be displayed 
>   
>   
>  Expected Results: It should restrict and display the max values as set in step 1. 
>   
>   
>  Workaround (if any): No Work around. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FLEX-20) The Max value restriction in Spark NumericStepper doesn't work properly

Posted by "Robert Cesaric (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLEX-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13219743#comment-13219743 ] 

Robert Cesaric commented on FLEX-20:
------------------------------------

For what it's worth, this is how we patched it (along the same solution as Pierangelo):

|| textDisplay.text == "" || isNaN(value) || (inputValue != value && 
	(Math.abs(inputValue - value) >= 0.000001 || isNaN(inputValue))))

....

override protected function setValue(newValue:Number):void
		{
			var oldVal:Number = value;  //oldVal var is just for sanity as we figure this out.
			if (isNaN(newValue))
				newValue = oldVal;
			
			super.setValue(newValue);
			
			applyDisplayFormatFunction();
		}

At the moment, I can't remember exactly why but we ended up moving the isNan check to the the setValue() function of the NumericStepper. I believe it also fixed some other bug with the valueFormatFunction().

This is a component that should really be rewritten but I guess that's a separate initiative.
                
> The Max value restriction in Spark NumericStepper doesn't work properly
> -----------------------------------------------------------------------
>
>                 Key: FLEX-20
>                 URL: https://issues.apache.org/jira/browse/FLEX-20
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Project Management
>         Environment: Apache FlexSDK 4.6 - Adobe FlexSDK 4.6 -  Adobe FlexSDK 4.5
>            Reporter: Pierangelo Mancusi
>            Assignee: Bertrand Delacretaz
>            Priority: Minor
>              Labels: patch
>         Attachments: NumericStepperPatch.txt
>
>
> original issue: https://bugs.adobe.com/jira/browse/SDK-31123
> here a summary:
> Steps to reproduce: 
> 1.Launch the browser with Numeric stepper. Set the min value as 10 max value as 50. Also set default values as 20. 
> 2.After launching the broswer clear the default value 20 and focus out from the numeric stepper. It displays "NAN" 
> 3. Again focus back to the numeric stepper and try to edit 3 digit value (Eg.777). Then foucs out. It doen't restrict to max value i.e"50" as set earlier in 
>    step 1. It allows the 3 digit value enetered instead. 
>   
>  Actual Results: The enetered value will be displayed 
>   
>   
>  Expected Results: It should restrict and display the max values as set in step 1. 
>   
>   
>  Workaround (if any): No Work around. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FLEX-20) The Max value restriction in Spark NumericStepper doesn't work properly

Posted by "Justin Mclean (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLEX-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13216943#comment-13216943 ] 

Justin Mclean commented on FLEX-20:
-----------------------------------

We don't currently have a style guide for code patches yet so for now try and code in the same style as surrounding code. I'd suggest something like this:

// Restore old value see https://bugs.adobe.com/jira/browse/SDK-31123 					
if (isNaN(inputValue))
{
	inputValue = value;
}



                
> The Max value restriction in Spark NumericStepper doesn't work properly
> -----------------------------------------------------------------------
>
>                 Key: FLEX-20
>                 URL: https://issues.apache.org/jira/browse/FLEX-20
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Project Management
>         Environment: Apache FlexSDK 4.6 - Adobe FlexSDK 4.6 -  Adobe FlexSDK 4.5
>            Reporter: Pierangelo Mancusi
>            Assignee: Bertrand Delacretaz
>            Priority: Minor
>              Labels: patch
>         Attachments: NumericStepperPatch.txt
>
>
> original issue: https://bugs.adobe.com/jira/browse/SDK-31123
> here a summary:
> Steps to reproduce: 
> 1.Launch the browser with Numeric stepper. Set the min value as 10 max value as 50. Also set default values as 20. 
> 2.After launching the broswer clear the default value 20 and focus out from the numeric stepper. It displays "NAN" 
> 3. Again focus back to the numeric stepper and try to edit 3 digit value (Eg.777). Then foucs out. It doen't restrict to max value i.e"50" as set earlier in 
>    step 1. It allows the 3 digit value enetered instead. 
>   
>  Actual Results: The enetered value will be displayed 
>   
>   
>  Expected Results: It should restrict and display the max values as set in step 1. 
>   
>   
>  Workaround (if any): No Work around. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FLEX-20) The Max value restriction in Spark NumericStepper doesn't work properly

Posted by "Pierangelo Mancusi (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLEX-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13219584#comment-13219584 ] 

Pierangelo Mancusi commented on FLEX-20:
----------------------------------------

Hi John,
fist of all, nice to meet you.

let's start the answer:
your comment  to the  issue at Adobe site is wrong, cause it's based on a bad interpretation of the issue.
Of course, before i started to work on this, i tested your solution but it was wrong. (i compiled the SDK with your suggestion...btw thanks Justin for your  good work )

When the component is created passing nothing to the "value" property, it inherits the property "value=0" from the Range.as class (if you assign a numeber, the component takes it obviously).

when we change the value in the component, the TextInput.text is passed to the NumberFormatter.parseNumber(parseString:String) ( see line 796 - NumericStepper.as)

This last help method return NaN and the property lastOperationStatus of NumberFormatter class  is set first to "illegalArgumentError" and then to "parseError".

Here is the mistake and the question is: When we can insert a "NaN" value in the NumericStepper's TextInput, which accepts  only strings rapresenting a number?...never i say.

so when  NumericSteppes's  inputValue is NaN, after all possible assignement in that method,  i restore the last valid value.

that is the fix.

Also i 100% agree with you  when you say that the comparison at line 791 of the NumericStepper class  is rather questionable.
Never seen an if like that :)

                
> The Max value restriction in Spark NumericStepper doesn't work properly
> -----------------------------------------------------------------------
>
>                 Key: FLEX-20
>                 URL: https://issues.apache.org/jira/browse/FLEX-20
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Project Management
>         Environment: Apache FlexSDK 4.6 - Adobe FlexSDK 4.6 -  Adobe FlexSDK 4.5
>            Reporter: Pierangelo Mancusi
>            Assignee: Bertrand Delacretaz
>            Priority: Minor
>              Labels: patch
>         Attachments: NumericStepperPatch.txt
>
>
> original issue: https://bugs.adobe.com/jira/browse/SDK-31123
> here a summary:
> Steps to reproduce: 
> 1.Launch the browser with Numeric stepper. Set the min value as 10 max value as 50. Also set default values as 20. 
> 2.After launching the broswer clear the default value 20 and focus out from the numeric stepper. It displays "NAN" 
> 3. Again focus back to the numeric stepper and try to edit 3 digit value (Eg.777). Then foucs out. It doen't restrict to max value i.e"50" as set earlier in 
>    step 1. It allows the 3 digit value enetered instead. 
>   
>  Actual Results: The enetered value will be displayed 
>   
>   
>  Expected Results: It should restrict and display the max values as set in step 1. 
>   
>   
>  Workaround (if any): No Work around. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FLEX-20) The Max value restriction in Spark NumericStepper doesn't work properly

Posted by "John Fletcher (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLEX-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13217131#comment-13217131 ] 

John Fletcher commented on FLEX-20:
-----------------------------------

Pierangelo, I've had a look at your patch and I'm glad to see someone is working on this, but I believe that this is not the correct solution to the problem. Your solution is effectively to prohibit NaN from being allowed in NumericSteppers. Currently NaN is permitted, so this patch would constitute a design change with further reaching consequences, not a simple bug fix.

Have you read my comment at https://bugs.adobe.com/jira/browse/SDK-31123? This details what I believe is a better solution.
                
> The Max value restriction in Spark NumericStepper doesn't work properly
> -----------------------------------------------------------------------
>
>                 Key: FLEX-20
>                 URL: https://issues.apache.org/jira/browse/FLEX-20
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Project Management
>         Environment: Apache FlexSDK 4.6 - Adobe FlexSDK 4.6 -  Adobe FlexSDK 4.5
>            Reporter: Pierangelo Mancusi
>            Assignee: Bertrand Delacretaz
>            Priority: Minor
>              Labels: patch
>         Attachments: NumericStepperPatch.txt
>
>
> original issue: https://bugs.adobe.com/jira/browse/SDK-31123
> here a summary:
> Steps to reproduce: 
> 1.Launch the browser with Numeric stepper. Set the min value as 10 max value as 50. Also set default values as 20. 
> 2.After launching the broswer clear the default value 20 and focus out from the numeric stepper. It displays "NAN" 
> 3. Again focus back to the numeric stepper and try to edit 3 digit value (Eg.777). Then foucs out. It doen't restrict to max value i.e"50" as set earlier in 
>    step 1. It allows the 3 digit value enetered instead. 
>   
>  Actual Results: The enetered value will be displayed 
>   
>   
>  Expected Results: It should restrict and display the max values as set in step 1. 
>   
>   
>  Workaround (if any): No Work around. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (FLEX-20) The Max value restriction in Spark NumericStepper doesn't work properly

Posted by "Pierangelo Mancusi (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FLEX-20?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pierangelo Mancusi updated FLEX-20:
-----------------------------------

    Attachment: NumericStepperPatch.txt

here's my patch
                
> The Max value restriction in Spark NumericStepper doesn't work properly
> -----------------------------------------------------------------------
>
>                 Key: FLEX-20
>                 URL: https://issues.apache.org/jira/browse/FLEX-20
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Project Management
>         Environment: Apache FlexSDK 4.6 - Adobe FlexSDK 4.6 -  Adobe FlexSDK 4.5
>            Reporter: Pierangelo Mancusi
>            Assignee: Bertrand Delacretaz
>            Priority: Minor
>              Labels: patch
>         Attachments: NumericStepperPatch.txt
>
>
> original issue: https://bugs.adobe.com/jira/browse/SDK-31123
> here a summary:
> Steps to reproduce: 
> 1.Launch the browser with Numeric stepper. Set the min value as 10 max value as 50. Also set default values as 20. 
> 2.After launching the broswer clear the default value 20 and focus out from the numeric stepper. It displays "NAN" 
> 3. Again focus back to the numeric stepper and try to edit 3 digit value (Eg.777). Then foucs out. It doen't restrict to max value i.e"50" as set earlier in 
>    step 1. It allows the 3 digit value enetered instead. 
>   
>  Actual Results: The enetered value will be displayed 
>   
>   
>  Expected Results: It should restrict and display the max values as set in step 1. 
>   
>   
>  Workaround (if any): No Work around. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FLEX-20) The Max value restriction in Spark NumericStepper doesn't work properly

Posted by "Pierangelo Mancusi (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLEX-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13216521#comment-13216521 ] 

Pierangelo Mancusi commented on FLEX-20:
----------------------------------------

Sorry, I did a duplicate from the Adobe jira...
                
> The Max value restriction in Spark NumericStepper doesn't work properly
> -----------------------------------------------------------------------
>
>                 Key: FLEX-20
>                 URL: https://issues.apache.org/jira/browse/FLEX-20
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Project Management
>         Environment: Apache FlexSDK 4.6 - Adobe FlexSDK 4.6 -  Adobe FlexSDK 4.5
>            Reporter: Pierangelo Mancusi
>            Assignee: Bertrand Delacretaz
>            Priority: Minor
>              Labels: patch
>         Attachments: NumericStepperPatch.txt
>
>
> original issue: https://bugs.adobe.com/jira/browse/SDK-31123
> here a summary:
> Steps to reproduce: 
> 1.Launch the browser with Numeric stepper. Set the min value as 10 max value as 50. Also set default values as 20. 
> 2.After launching the broswer clear the default value 20 and focus out from the numeric stepper. It displays "NAN" 
> 3. Again focus back to the numeric stepper and try to edit 3 digit value (Eg.777). Then foucs out. It doen't restrict to max value i.e"50" as set earlier in 
>    step 1. It allows the 3 digit value enetered instead. 
>   
>  Actual Results: The enetered value will be displayed 
>   
>   
>  Expected Results: It should restrict and display the max values as set in step 1. 
>   
>   
>  Workaround (if any): No Work around. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FLEX-20) The Max value restriction in Spark NumericStepper doesn't work properly

Posted by "John Fletcher (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLEX-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13217133#comment-13217133 ] 

John Fletcher commented on FLEX-20:
-----------------------------------

Basically the if statement should read:
if (textDisplay.text == "" || (inputValue != value && 
(Math.abs(inputValue - value) >= 0.000001 || isNaN(inputValue) || isNaN(value))))

                
> The Max value restriction in Spark NumericStepper doesn't work properly
> -----------------------------------------------------------------------
>
>                 Key: FLEX-20
>                 URL: https://issues.apache.org/jira/browse/FLEX-20
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Project Management
>         Environment: Apache FlexSDK 4.6 - Adobe FlexSDK 4.6 -  Adobe FlexSDK 4.5
>            Reporter: Pierangelo Mancusi
>            Assignee: Bertrand Delacretaz
>            Priority: Minor
>              Labels: patch
>         Attachments: NumericStepperPatch.txt
>
>
> original issue: https://bugs.adobe.com/jira/browse/SDK-31123
> here a summary:
> Steps to reproduce: 
> 1.Launch the browser with Numeric stepper. Set the min value as 10 max value as 50. Also set default values as 20. 
> 2.After launching the broswer clear the default value 20 and focus out from the numeric stepper. It displays "NAN" 
> 3. Again focus back to the numeric stepper and try to edit 3 digit value (Eg.777). Then foucs out. It doen't restrict to max value i.e"50" as set earlier in 
>    step 1. It allows the 3 digit value enetered instead. 
>   
>  Actual Results: The enetered value will be displayed 
>   
>   
>  Expected Results: It should restrict and display the max values as set in step 1. 
>   
>   
>  Workaround (if any): No Work around. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira