NumericStepper with stepSize = 0,1 the NaN value

I have a spark NumericStepper:

< s:NumericStepper value = "0" stepSize = "0.1" / >

When I first click on the NumericStepper component to increment the value, it goes from "0" to "0.1", it's ok.

But when I click again to increment or decrement, it displays "NaN".

To debug the NumericStepper and it seems that my default locale is fr_FR and waits as the decimal separator ',' instead of '. '.

But if I try to put stepSize = '0.1' I have a compilation error because 0.1 cannot be cast as a number.

Is this a bug? is there a work around to have a french decimal stepSize with locale?

There are really two separate issues:

(1) halo NumberValidator error validation for decimal values when locale is set to fr_FR

(2) Spark NumericStepper doesn't change separator decimal, based on locale

I will file a separate issue for the issuance of NumberValidator Halo.  Introduced by Bill can be used to track the decimal separator not changing not based on the locale.

To work around the problem, you can change the way the value is displayed by the NumericStepper component using the valueFormatFunction and the valueParseFunction.

For example, the following text replaces the "." decimal separator with a «,»


private void myFormatFunc(val:Number):String
{
Return val.toString ().replace(".",",");
}

private void myParseFunc(val:String):Number
{
var stringVal:String = val.replace (",",".");
Return Number (stringVal);
}
]]>

Tags: Flex

Similar Questions

  • Help with a sql using the ASCII value

    Hello

    I have a table with the following data
    DOC_NO     CLIENT_REV
    ------     ----------
    240          A
    240          B
    240          B
    240          C
    240          C
    240          C
    240          0
    240          1
    240          1
    240          1
    240          2
    240          2
    240          2
    241          A
    241          A
    241          B
    241          C
    241          C
    241          D
    The requirement is retur the following values:
    240          2
    241          D
    I tried with the ASCII function, but the necessary result is somewhat complicated. That is to say for a group of doc_no I need as many client_rev if there are numbers, if not then I need the largest letter.

    How can I achieve this requirement?

    Kind regards.

    Hello

    What do you mean by "the decision must be the minor doc_date?
    It would be useful that you posted your desired results.
    I assume you mean you want only the line with the doc_date lowest (for each doc_no).
    in other words, the desired results are:

        DOC_NO L DOC_DESC           DOC_DATE
    ---------- - ------------------ ---------
           240 2 Description of 240 01-JAN-09
           241 D Description of 241 01-FEB-09
    

    Here's a way to get these results:

      SELECT x.doc_no, x.last_client_rev, y.doc_desc, y.doc_date
      FROM     (     -- Begin sub-query based on table_a
         SELECT   doc_no,
                     MAX (client_rev) KEEP
                       (DENSE_RANK LAST ORDER BY TRANSLATE(client_rev
                                                           ,'ABCD012' -- Desired sort order
                                                           ,'012ABCD'  -- Actual sort order
                                                          )) AS last_client_rev
         FROM       table_a
            GROUP BY  doc_no
         ) x,
         (     -- Begin sub-query based on table_b
         SELECT       doc_no,
                MAX (doc_desc) KEEP (DENSE_RANK FIRST ORDER BY doc_date)
                             AS doc_desc,
                MIN (doc_date)     AS doc_date
         FROM       table_b
         GROUP BY  doc_no
         ) y
      WHERE x.doc_no = y.doc_no;
    

    As you restrict the table_a lines are used, so now you restrict table_b lines are used.

    First, let's review what you do with table_a.
    Table_a has multiple lines with the same doc_no.
    You only want to consider one of these lines: one that comes last, when to sort your particular way.
    If your main query does not use the table_a:
    It uses a subquery table_a-based which is a GROUP BY doc_no, to ensure that only the row by doc_no is used.

    Now, what is the problem with table_b?
    Table_b has as many rows with the same doc_no.
    You only want to consider one of these lines: the one with the lowest doc_date.
    So your main query should not use table_b:
    She must use a subquery table_b-based which is a GROUP BY doc_no, to ensure that only the row by doc_no is used.

  • HELP Please: compare timestamps with excel and make the corresponding value in the next column

    Hello

    I have attached the program I did up to now and the txt file required by the program.

    I want to compare the timestamp given by me at the beginning of the program, and when it is true, I want to take the corresponding value of nearby and use for the calculation.

    I am able to compare the time but I do not know how to take the corresponding '0' or '1' value of the file.

    I'm a beginner to labview. It can be simple, but I couldn't understand it

    Kindly help.

    Thanks in advance

    Arun

    This?  If you get a match, find a true Boolean 1 d array and use the index of the element to get the data of the next column.

  • How to set up default InDesign CS5 in the system with InDesign CS4 has the default value?

    How to set the application default .indd InDesign CS5 when you installed CS5 and InDesign CS4 and InDesign CS4 is the current default (InDesign CS4 has been installed after the installation of CS5)

    Thanks, but I already tried at first, but is not effective.

    I think that its because of this reason:
    The two - InDesign CS4 and InDesign CS5 have their application/program/exe named "indesign.exe".

    Installation of either InDesign CS4 or InDesign CS5, sets a default for the 'indesign.exe' Windows path. In this case, since InDesign CS4 was installed later (after InDesign CS5 was already installed), the "indesign.exe" which has been staged "Indesign.exe" of InDesign CS5 has been replaced by "Indesign.exe" of InDesign CS4.

    But after long google and searching through regedit, I have the solution:

    1. Search for HKEY_CLASSES_ROOT\InDesign.Document\Shell\Open\Command in regedit
    2. Change the value of the attribute (default) for "C:\Program Files (x 86) \Adobe\Adobe" '%1' / / including the quotes

    Post edited by: Vidit Kothari

  • Show a column with a list of the DOUBLE values;

    Hello, how to display something like:

    COL1
    -------
    A
    B
    C
    D
    E
    F

    drbiloukos wrote:
    ORA-00904: "REGEXP_REPLACE": invalid identifier
    00904, 00000 - '% s: invalid identifier '.
    * Cause:
    * Action:
    Error on line: column 132: 28

    I'm on 9i

    Really? I've seen that mentioned anywhere before. How everybody had to know that you are using an older version of the database does not support?

    In any case...

    SQL> ed
    Wrote file afiedt.buf
    
      1  with t as (select 'I Need a List with Words not Letters' as txt from dual)
      2  --
      3  select substr( txt
      4               , decode(level, 1, 1, instr(txt, ' ', 1, level-1)+1)
      5               , decode(instr(txt, ' ', 1, level), 0, length(txt), instr(txt, ' ', 1, level)
      6                 - decode(level, 1, 0, instr(txt, ' ', 1, level-1))-1)
      7               ) val
      8  from t
      9* connect by level <= length(txt)-length(replace(txt,' '))+1
    SQL> /
    
    VAL
    ------------------------------------
    I
    Need
    a
    List
    with
    Words
    not
    Letters
    
    8 rows selected.
    
    SQL>
    
  • SelectManyShuttle: get the selected values

    Hi all.

    My task is to make declarative component (or any other reusable solution) that contains the selected component to many shuttle and should proceed with a treatment of the selected values (IDs and labels). During this operation, I found that this shuttle component returns the bean always and only point index, nothing more.
                  <af:selectManyShuttle label="" id="sms1"
                                        styleClass="AFStretchWidth"
                                        value="#{MyBean.selected}"
                                        valueChangeListener="#{MyBean.shuttleChangeListener}"
                                        valuePassThru="true">
                    <f:selectItems value="#{attrs.items}" id="si1"/>
                  </af:selectManyShuttle>
    First of all, I tried MyBean.setSelected and found it is called with list < integer > instead of < SelectItem > list or any similar. These integers is the index 0 of selected lines. Then I tried to valuePassThru, but it triggered a mocking effect only: setSelected receives List < String > with the same values of the index 0 chained. Finally, I tried valueChangeListener and newValues - everything was the same, both in JDeveloper corresponding 11.1.1.5 & 11.1.2.1 with ADFs. Googling did me a lot of links--say, the need to get the values selected from the selectManyShuttle --but nothing that I can use.

    Maybe I should get a model and an iteration, but in several tests (for example, ((MyBean) this) .getAttribute ('items')) I failed to locate him. In any case, I would be happy to see that any solution work.

    What do you get when solve you the EL "#{attrs.items}" in the method of bean? Not sure if you have access to everything or what you get in return, but you can try.
    Just put a breakpoint in the method and type the EL in the evaluator 'EL' and see if you get something in return and what type it is. I hope you have the list you put in to fill the shuttle.

    Timo

  • Several key pointing to the same value in the cache?

    I would like to do something like
    MyObject o = new MyObject();
    cache.put("A", o);
    cache.put("B", o);
    cache.put("C", o);
    
    cache.invoke("A", new RelfectionUpdater("setSomeValue", 1));
    cache.invoke("B", new RelfectionUpdater("setSomeValue", 2));
    cache.invoke("C", new RelfectionUpdater("setSomeValue", 3));
    
    int x = cache.invoke("A", new ExtractorProcessor("getSomeValue")); 
    //x=3
    I want this type of behavior, even if I change to another caching strategy. Should I wait?

    Thank you
    Andrew

    Hi Andrew

    To answer this question, I think we need to take a step back and understand what is happening when we first put ().
    During the option put, the object is serialized into a binary format associated with a key. The key/value then moves to an arbitrary location for storage. A way of thinking that it is that the value is copied from your Java to another memory space space memory local or remote.

    Puts subsequent will be associated and copy 'o' to potentially different memory spaces. That the 'o' associated A is not equal to B 'o'.

    There are ways to achieve what you want to do, but because of the indirection, it will be very slow. The model is to store the value in a put and use the key as a value in A, B and C.

    Thank you
    / Charlie

  • Analysis.Math.Statistics fails when NaN values are included in the entry tables

    Hi all..

    With the help of Measurement Studio to Version 8.9 of .net. We need calculate statistics on a table that contains a double. NaN values. When I do this I get NaN as the result of any of the statistical methods (average, STDS etc.) ... Interestingly, the Math.ArrayOperations methods look like they work. Any ideas?

    Thank you

    gdssoftware

    Hi GDSSoftware,

    You see this behavior because the statistical functions with Measurement Studio ignore not input values NaN - that is why, they will return results NaN.  To work around this problem, you will need to filter these NaN values out of your input array before performing statistical analysis on this subject.

    If you're working with .NET 3.5 and later versions, you can do this by using the following:

    Double [] vals = new double [] {0d, 6 d, 10 d, 4 d, double. NaN};
    Double [] nanless_vals = vals. Where (d =>! double.) IsNaN (d)). ToArray();

    If you use an earlier version of the .NET framework, you will need to perform a loop on the table with the following (or something similar):

    Double [] vals = new double [] {0d, 6 d, 10 d, 4 d, double. NaN};
    List nanless_list As new List();
    for (int i = 0; i)< vals.length;="">
    If (! double.) IsNaN (vals [i]))
    nanless_list. Add (Vals [i]);
    Double [] nanless_vals is nanless_list. ToArray();

    I hope this helps!

    Kind regards

    Stephanie R.

    National Instruments

  • I have a column with two values, separated by a space, in each line. How to create 2 new columns with the first value in a column, and the second value in another column?

    I have a column with two values, separated by a space, in each line. How do I create 2 new columns with the first value in one column and the second value in another column?

    Add two new columns after than the original with space separated values column.

    Select cell B1 and type (or copy and paste it here) the formula:

    = IF (Len (a1) > 0, LEFT (A1, FIND ("", A1) −1), ' ')

    shortcut for this is:

    B1 = if (Len (a1) > 0, LEFT (A1, FIND ("", A1) −1), ' ')

    C1 = if (Len (a1) > 0, Member SUBSTITUTE (A1, B1 & "", ""), "")

    or

    the formula of the C1 could also be:

    = IF (Len (a1) > 0, RIGHT (A1, LEN (A1) −FIND ("", A1)), "")

    Select cells B1 and C1, copy

    Select cells B1 at the end of the C column, paste

  • How re - initialize an array with the new values at run time?

    Hello

    In this application of particluar I want to change the value of a particular index (Ex: 4th move in a 1 d table) and store the changed value (Inremented) in the same index position.

    I wrote a program, can someone tell what I am doing wrong?

    LabVIEW version: 8.6

    Screenshot kindly updated instead of .vi

    Two things.

    First of all:

    You must initialize the table (via the feedback loop).

    Click with the right button on the wire of the array and create constant.  Move the index of item 99.  Initialize element 0.  This thread up to the lower part of the feedback node.

    Second:

    You use an Insert in the table VI, but it's not describe what you try to do.  While he places an element in the position shown is also increases the size of the table.

    This change to a subset of table replace VI.

  • kindly tell how to use the unique value of a table with the index 0

    kindly tell how to use the unique value of a table with the index 0

    Hi
     
    Yep, use Index Array as Gerd says. Also, using the context help ( + h) and looking through the array palette will help you get an understanding of what each VI does.
     
    This is fundamental LabVIEW stuff, perhaps you'd be better spending some time going through the basics.
     
    -CC
  • Save the selected value from the ListBox with its respective values control tab dropdown selected in another list box

    Hi all

    I'm doing a vi where I save the selected value from the ListBox with values respective tab control dropdown selected in another list box. Whenever I select Item1 can change of course and the respective tab will be open for this element. But now I want to just save the selection and put it into another ListBox.SO I can't renmove or add my wishes. Please help me.

    It will work.

    Probably not the greatest solution well.

  • Write to digitall all ports (channels) with the decimal value

    Hello

    It is possible to write all digital channels with a value decimal for a device with 96 channels at the same time?

    I have a USB-6509 camera and I want to write each value of Pentecost bit 1 in the loop (for the first transfer I write 0,1,2,4,8,16, 32, 64 and 128) with the line "Dev3/port0 / line0:7", but if I want to write all ports at the same time, how to set the line and the "write.vi DAQmx?

    Thank you.

    You can configure the reading and writing in the ports of 8 bits with the 6509.  For example, you could write just 128 to "Dev3/port0.  If you want to write to all 12 ports, I recommend doing a task that is several channels on the 6509 module, each channel of the task being a port.  You can then use the channel Multiple, single sample of writing of your values.  Your values must be in a table of U8.

  • When I delete the "screensaverissecure" with the registry value, it reappears again in the registry after I stop and start the system the next day. Help, please

    When I delete the "screensaverissecure" with the registry value, it reappears again in the registry after I stop and start the system the next day. Help, please
    use widows xp

    Hello

     
    1. Have you tried to Hibernate for ever in the power settings option?
     
    To resolve this problem, you can follow the steps below.
     
    (a) click and start
    (b) type power Option in the start search bar.
    (c) now select click Change plan for the current plan of the selected power.
    (d) now click on advanced power settings.
    (e) scroll down and click on the sign more next to sleep.
    (f) now click on allow the eve hybrid and turn it off.
    (g) click on the option put into hibernation after and set it to never.
     
  • Simulator Device.xml file has a tag with an attribute of memory, what are the optional values for this attribute of the os?

    In the Device.xml file, it starts with the tags of the os. Each os has a memory attribute. What are the optional values for the attribute memory?

    Can we really control the memory for the simulators?

    0x85000F03
    0x8C000F03
    0x87000F03
    0x84001503
    0x86001503
    0x04001507
    0x0F001507
    0x0C001404
    0x0D001404
    0x0E001404
    0x0D000D04
    0x16000D04
    0x05001504
    0x07001504
    

    These values refer to specific hardware configurations are simulated.  They should not be changed.

Maybe you are looking for

  • HP PAVILION DV7: HP PAVILLION DV7 disabled

    Disable the Code ' 51549223 did try 3 times no luck. "

  • Multiple entries in a string

    Firstly, sorry if my Labview terminology is not fundamentally to point what I have is an array of strings, and each of these strings contains a message. Each of these messages represents a condition that is checked for via comparison logic, and if a

  • Re: UAC brings up a box when I add new programs or try to uninstall programs

    an example of what is going on... I tried to uninstall a program and a Monte box that says UAC... do you want to allow windows make changes to this program from your hard drive... (I go to programs and features to uninstall.. .the Panel) He said that

  • Creation of SQLITE InsertQuery

    IAM trying to do a generic function to insert data to the specified table. What I have done until now is the following: Intialise() { QVariantMap parametersMap; //Assuming that Data to insert will be received as QVarient map from server.So I just add

  • HP notebook a1u60av my ports on the left side 2 stop working. Once again

    Hi This is my second time that my ports on the left side are out. the first fix was great.  the usb on the right work well.    Maybe I need to replace the ports. under the Device Manager it say they are o k you can help me again. Thanks again my mode