• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

NumericStepper - Adobe ActionScript® 3 (AS3 Flex) API Reference

Explorer ,
Sep 20, 2012 Sep 20, 2012

Copy link to clipboard

Copied

TOPICS
ActionScript

Views

986

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 20, 2012 Sep 20, 2012

Copy link to clipboard

Copied

I seem to be encountering problems with numeric stepper values over several billion. It is hard to say where the exact break line is, but I have suddenly begun receiving bug reports from users who are 'winning the resource wars' in my application.

City has 120Bn gold, 7bn food, 600M wood, 600m stone, 700m iron

1: Clean open of the0bot

2: Wait a few mins for everything to process

3: open TB5

4: values auto displayed in gold window are: -429129244 (s/b 0)

5: Click "Clear", "Refresh"

6: Gold now cleared but this displayed in Food: 1448289086

7: NB: No troops have been selected yet

There are 5 steppers in a group, the individual limit for any control is variable, set by the formula

control.maximum = (totalGroup.maximum - totalGroup.value) + component.value)

Since the practical limit in the application is actually 999,999,999 I can modify the code to work, but the API says: Maximum value of the NumericStepper. The maximum can be any number, including a fractional value.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 20, 2012 Sep 20, 2012

Copy link to clipboard

Copied

make sure you are trying to assign a number to your stepper, not a string like 999,999,999 (or anything else that contains a comma).

you can assign fractional values your stepper but that will be rounded to a whole number unless you assign a fractional stepSize to your stepper.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 02, 2013 Apr 02, 2013

Copy link to clipboard

Copied

Here is the issue: when set value outside of the range and click a “submit” button, the value is automatically changed and submitted. And customer complains they even do not realize it’s out of range and there should be an error message to remind them.

But I found it’s hard to handle it.

Do you have any suggestion on that?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 03, 2013 Apr 03, 2013

Copy link to clipboard

Copied

LATEST

you can use the testField property of the numeric stepper class to access changes to the textinput component part of the stepper.

you can use a stepper listener like focusin (and a loop) or focusout to check for changes to the textField of the stepper and display warnings and/or reset the textField's text property.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines