incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Cesaric (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLEX-20) The Max value restriction in Spark NumericStepper doesn't work properly
Date Thu, 01 Mar 2012 02:35:56 GMT

    [ 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

        

Mime
View raw message