How to resolve Comparison between a value with static type string and a possible unrelated type numb

I am new to this and any help would be greatly appreciated, Im trying to display custom numbers for values of a Hslider.
Here is my code so far:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                                 xmlns:s="library://ns.adobe.com/flex/spark"
                                 xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
  <fx:Declarations>
  <!-- Place non-visual elements (e.g., services, value objects) here -->
  </fx:Declarations>
  <fx:Script>
                    <![CDATA[
                              import mx.events.SliderEvent;
                              protected function ValueSlider_changeHandler(event:SliderEvent):void
                              ValueLabel.text = String(ValueSlider.value);
                                        if(ValueSlider.value == "0")
                                        ValueLabel.text = "150";
                                        if(ValueSlider.value == "1")
                                        ValueLabel.text = "333";
                                        if(ValueSlider.value == "2")
                                        ValueLabel.text = "543";
                                        if(ValueSlider.value == "3")
                                        ValueLabel.text = "9342";
                    ]]>
  </fx:Script>
          <s:Panel x="199" y="141" width="250" height="200">
                    <s:HSlider id="ValueSlider" x="74" y="68" maximum="5" minimum="0" stepSize="1"/>
                    <s:Label id="ValueLabel" x="109" y="38" text="Label"/>
  </s:Panel>
</s:Application>

Thank you for your help, I was using quotes around the number from a suggestion on another forum. Now how to I display the result on valueLabel? "valueLabel.text"? {valueLable.text}, "const"?,
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                                 xmlns:s="library://ns.adobe.com/flex/spark"
                                 xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
  <fx:Declarations>
  <!-- Place non-visual elements (e.g., services, value objects) here -->
  </fx:Declarations>
  <fx:Script>
                    <![CDATA[
                              import mx.events.SliderEvent;
                              protected function ValueSlider_changeHandler(event:SliderEvent):void
                                        const CONVERSION:Array = ["150","333","543","9342"];
                                        valueLabel.text = CONVERSION[valueSlider.value];
                    ]]>
  </fx:Script>
          <s:Panel x="199" y="141" width="250" height="200">
                    <s:HSlider id="valueSlider" x="78" y="69" maximum="3" minimum="0" stepSize="1" value="1"/>
  <s:Label id="valueLabel" x="109" y="38" text= "(valueLabel.text)"/>  <-----what do I place here?
  </s:Panel>
</s:Application>

Similar Messages

  • How can I export photos from Aperture with a new sequence and ignore the embedded JPEG number? Have tried renumbering to no avail.

    How can I export photos from APERTURE with a new sequence and ignore the embedded JPEG number? Have tried renumbering to no avail.
    has anyone resolved this issue?
    This is now the second big Problem with using Apple's Appeture with NO apparent FIX...
    Aperture has NO DIRECT way to Burn to a CD/DVD & apparently NO way to RE-SEQUENCE the numbering system????
    ANYONE... I wish APPLE would address/fix these 2 problems... LIGHTROOM I guess is next?

    Hi David,
    Coming in and whining loudly is rude.  We are all volunteers here, voluntarily sharing our expertise so that users like you can make the most of their time with Aperture.  Speaking just for myself:  although I do care about your success with software (it's why I'm here), I don't care what software you use.  If you want to use Lightroom, do so, and post your questions in an appropriate forum.
    Burning files to a CD is a file operation done at the system level (it is built into OS X).  Aperture lets your create sharable image-format files from your Images.  You then use OS X's tools to burn those files to a CD.  Iirc, you can set up a "Burn Folder" in Finder, into which you can export files created from your Images, and with a single click burn your CD.
    Naming the files you create by exporting your Images can be tricky.  There are _many_ possibilities.  Some things can't be done.  Sequencing can be done in a number of ways (see Léonie's answer above).  What have you tried?  What was the result?  In what way did this differ from what you expected?
    --Kirby.

  • How can I get the element value with namespace?

    I tried to get a element value in xml has namespace but i can't.
    I removed the namespace, i can get a element value.
    How can i get a element value with namespace?
    --1. Error ----------- xml ------------------------------
    <?xml version="1.0" encoding="UTF-8"?>
    *<TaxInvoice xmlns="urn:kr:or:kec:standard:Tax:ReusableAggregateBusinessInformation:1:0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:kr:or:kec:standard:Tax:ReusableAggregateBusinessInformation:1:0 http://www.kec.or.kr/standard/Tax/TaxInvoiceSchemaModule_1.0.xsd">*
    <ExchangedDocument>
    <IssueDateTime>20110810133213</IssueDateTime>
    <ReferencedDocument>
    <ID>318701-0002</ID>
    </ReferencedDocument>
    </ExchangedDocument>
    <TaxInvoiceDocument>
    <IssueID>201106294100</IssueID>
    <TypeCode>0101</TypeCode>
    <IssueDateTime>20110810</IssueDateTime>
    <PurposeCode>02</PurposeCode>
    </TaxInvoiceDocument>
    <TaxInvoiceTradeLineItem>
    <SequenceNumeric>1</SequenceNumeric>
    <InvoiceAmount>200000000</InvoiceAmount>
    <TotalTax>
    <CalculatedAmount>20000000</CalculatedAmount>
    </TotalTax>
    </TaxInvoiceTradeLineItem>
    </TaxInvoice>
    --2. sucess ----------- xml ---------remove namespace---------------------
    <?xml version="1.0" encoding="UTF-8"?>
    <TaxInvoice>
    <ExchangedDocument>
    <IssueDateTime>20110810133213</IssueDateTime>
    <ReferencedDocument>
    <ID>318701-0002</ID>
    </ReferencedDocument>
    </ExchangedDocument>
    <TaxInvoiceDocument>
    <IssueID>201106294100</IssueID>
    <TypeCode>0101</TypeCode>
    <IssueDateTime>20110810</IssueDateTime>
    <PurposeCode>02</PurposeCode>
    </TaxInvoiceDocument>
    <TaxInvoiceTradeLineItem>
    <SequenceNumeric>1</SequenceNumeric>
    <InvoiceAmount>200000000</InvoiceAmount>
    <TotalTax>
    <CalculatedAmount>20000000</CalculatedAmount>
    </TotalTax>
    </TaxInvoiceTradeLineItem>
    </TaxInvoice>
    ---------- program ------------
    procedure insert_table
    l_clob clob,
    wellformed out boolean,
    error out varchar2
    is
    l_parser dbms_xmlparser.Parser;
    xmldoc xmldom.domdocument;
    l_doc dbms_xmldom.DOMDocument;
    l_nl dbms_xmldom.DOMNodeList;
    l_n dbms_xmldom.DOMNode;
    l_root DBMS_XMLDOM.domelement;
    l_node DBMS_XMLDOM.domnode;
    l_node2 DBMS_XMLDOM.domnode;
    l_text DBMS_XMLDOM.DOMTEXT;
    buf VARCHAR2(30000);
    xmlparseerror exception;
    TYPE tab_type is Table of xml_upload%ROWTYPE;
    t_tab tab_type := tab_type();
    pragma exception_init(xmlparseerror, -20100);
    l_node_name varchar2(300);
    begin
    l_parser := dbms_xmlparser.newParser;
    l_doc := DBMS_XMLDOM.newdomdocument;
    dbms_xmlparser.parseClob(l_parser, l_clob);
    l_doc := dbms_xmlparser.getDocument(l_parser);
    l_n := dbms_xmldom.makeNode(l_doc);
    l_nl := dbms_xslprocessor.selectNodes(l_n, '/TaxInvoice/TaxInvoiceDocument');
    FOR cur_tax In 0..dbms_xmldom.getLength(l_nl) - 1 LOOP
    l_n := dbms_xmldom.item(l_nl, cur_tax);
    t_tab.extend;
    t_tab(t_tab.last).ed_id := '5000000';
    dbms_xslprocessor.valueOf(l_n, 'IssueID/text()', t_tab(t_tab.last).tid_issue_id);
    dbms_xslprocessor.valueOf(l_n, 'TypeCode/text()', t_tab(t_tab.last).tid_type_code);
    END LOOP;
    FORALL i IN t_tab.first .. t_tab.last
    INSERT INTO xml_upload VALUES t_tab(i);
    COMMIT;
    dbms_xmldom.freeDocument(l_doc);
    wellformed := true;
    exception
    when xmlparseerror then
    --xmlparser.freeparser(l_parser);
    wellformed := false;
    error := sqlerrm;
    end insert_table;

    l_nl := dbms_xslprocessor.selectNodes(l_n, '/TaxInvoice/TaxInvoiceDocument');try to change as follow
    l_nl := dbms_xslprocessor.selectnodes(l_n,'/TaxInvoice/TaxInvoiceDocument','xmlns="urn:kr:or:kec:standard:Tax:ReusableAggregateBusinessInformation:1:0"');Edited by: AlexAnd on Aug 17, 2011 12:36 AM

  • How to get space between two values in a single cell of a table.

    hello,
            how to get space between two values in a single cell of a table.
    thanks a lot.
    kailash.

    sorry i got the answer.

  • How to make comparison between strings using Labview

    helo, i want to know, how to make comparison between array of string.?
    the transmitter have send the assign text such as
    A hello            Bhye  Cbye

    Hi Syanitaa,
    You actually only need to post the question once. 
    Multiple duplication. Please refer to this thread.

  • I have just owned a macbook pro and trying to learn things since i have all along used windows laptop. My first question is : when there are two files i am working together, one above the other on screen, how you switch over between the two with key ?

    I have just owned a macbook pro and trying to learn things since i have all along used windows laptop. My first question is : when there are two files i am working together, one above the other on screen, how you switch over between the two with key ?

    Hi...
    Mac OS X keyboard shortcuts
    Control-F4
    Move focus to the active (or next) window
    Shift-Control-F4
    Move focus to the previously active window
    By the way...  since you are new to Mac, click a clear space on your Desktop. You should see "Finder" top left corner of the screen in the menu bar.
    Click Help then click Help Center
    As an example type in    keyboard shortcuts
    You can use the Help menu for almost any application on your Mac.
    Apple - Find Out How - Mac Basics
    For held switching from PC to Mac >  Apple - Support - Switch 101

  • How do i create a little network with my i-mac and macbook

    how do i create a little network with my i-mac and macbook

    Hello:
    To give a sensible answer, a little more information is needed.
    I am guessing that you want to set up a wireless network as you have both a desktop and laptop.
    There are some pretty good tutorials/articles in the knowledge base articles.
    Barry

  • I was trying to get the iOS 8.2 on my iPhone 5 but then it stopped and my phone is now on recovery mode I have pictures I need and they did not all fit on iCloud  how can I use the phone again with ALL my pictures and videos without restoring it?

    I was trying to get the iOS 8.2 on my iPhone 5 but then it stopped and my phone is now on recovery mode I have pictures I need and they did not all fit on iCloud  how can I use the phone again with ALL my pictures and videos without restoring it?

    Contacts are designed to be synced to a supported application on the computer or a cloud service.
    Pictures taken with the device are designed to regularly be copied off the device to a computer as would be done with any digital camera.
    If you have failed to use the device as designed it may be too late to recovery anything.
    Is the device regularly backed up to a computer via iTunes?  If so, the most recent backup (when restored to a replacement iOS device) should contain all contacts and pictures as of when the backup was created.

  • Can I transfer docs between a MacBook with a Intel processor and a iMac with a PowerPC processor by using a usb cord?

    Can I transfer docs/folders between a MacBook with a Intel processor and a iMAC with a PowerPC processor using a usb cord? Or by loading from the MacBook to a external drive and then to the Imac.

    You need to use an external drive, FireWire cable, Ethernet cable, or wireless connection.
    (73713)

  • I do not have master card,visa card to make my apple ID,tell me how can I make my apple ID with out master card and visa card

    I do not have master card,visa card to make my apple ID,tell me how can I make my apple ID with out master card and visa card

    It will if you follow, exactly, the instructions on the page that lllaass included in the post above yours : Create an iTunes Store, App Store, or iBooks Store account without a credit card or other payment method

  • HT1430 How can I restart my iphone 4 with no sleep button and frozen apps?

    how can I restart my iphone 4 with no sleep button and frozen apps?

    So, I called support this morning, if this happens to you, call them.
    There's nothing you can do on your own at this point (without voiding a warranty.)

  • I keep having the same problem with my messages over and over again. My number is not checked in my message settings it just unchecks itself

    I keep having the same problem with my messages over and over again. My number is not checked in my message settings it just unchecks itself

    Dear Tomarshe
    I had the same problem a couple of weeks back.
    What I did was that I restarted that Ipad of mine and voila!
    Problem solved!
    hope this helped!
    - DASHdotDASHdot

  • How to resolve a 'no sound' problem with UPI Grand Piano application?

    I have purchased the UPI piano from the AppStore, but am at a loss to know how to resolve the problem of a silent piano. I have entered the 'Audio & Midi Settings' zone within the application more times than I care to remember and need a wise owl to end my frustration sooner rather than later. The set up recognises my keyboard - a Yamaha MOX8 - as the MIDI input lists five numercial ports that could be ticked. Port A is the default MIDI port. Within the routing section, the plug in output merely shows 'Main Out Left' & 'Main Out Right' and under the Physical Output label, "None" appears twice to correspond, but without any options. The Audio Device correctly identifies Core Audio & the Yamaha MOX8 as the API and ouput device, respectively.
    So, what am I missing here? Probably something that a child of six could fathom in an instant. If you are or know one or are just a wise old owl, pregnant with knowledge: please put me out of my misery, so that I can just enjoy using this wonder of technology (I hope). Thank you.

    Contact the app's developer at the support link on the app's Mac App Store page.

  • How to insert or update comparing values  with two or more table

    Hai All
    I have three or four table in my database.
    Table 1 Dailattend is the main table here i need to insert or update my data and the fieds are
    Emplcode number,attdate date, intime date,intrin date ,introut date, outtime date are the fields
    Table 2 acclempbarcode the fields are
    emplcode number ,barcode number ....etc
    so now my data is in text format and i have broke the date like this
    0011221100112200100320100815
    First 16 is barcode and next 8 is date and 4 is time and i have created a temp table and store the date and move to main table
    My problem is the main table dailattend has no barcode so when i am going to insert or update i need to check whether the barcode is match with the emplcode in the main table
    How can i write insert or update statement
    The data is like this
    00110022 is barcode,10-03-2010 is my date and 0815 is time so i need to insert into dailattend table so now i have emplcode in dailattend table so i need to compare the barcode belong the emplcode in the another table and i need to insert in the dailattend table
    Pls give me some solution with example
    Regards
    Srikkanth.M

    try somthing like this
    create table t1
    as
    select '0011221100112200' barcode,to_date('100320100815','ddmmyyyyhh24mi') dt
    from dual
      create table barcodetbl
      emplcode varchar2(2000)
      barcode varchar2(2000)
      datetime date
    merge into barcodetbl bc
    using( select  * from  t1) x
    on
    (bc.barcode = x.barcode)
    when matched
    then update
    set datetime = x.dt
    when not matched
    then
    insert (emplcode,barcode,datetime)
    values(1,x.barcode,x.dt)
    /didn't realize that barcode is not in the main table.
    something along the lines
    Table 1 Dailattend is the main table here i need to insert or update my data and the fieds are
    Emplcode number,attdate date, intime date,intrin date ,introut date, outtime date are the fields
    Table 2 acclempbarcode the fields are
    emplcode number ,barcode number ....etc
    merge into dailattend bc
    using( select  * from  t1, acclempbarcode ac where t1.barcode = ac.barcode) x
    on
    (bc.emplcode = x.emplcode)
    when matched
    then update
    set datetime = x.dt
    when not matched
    then
    insert (emplcode,datetime)
    values(1,x.dt)
    /Alvinder
    Edited by: alvinder on Mar 23, 2010 3:50 PM

  • Comparison between entered value and stored value

    An user enters his or her code, the code needs to match the code which corresponds to her code in the file, else the value is set to zero and asks to be re-entered, if correct to proceed.
    Attachments:
    hell.vi ‏63 KB

    And what is the problem?
    Using the constant seems to be working as you describe, is it when you read a file there is a problem? If so could you supply one such file?
    MTO

Maybe you are looking for

  • Differnce between null string and an empty string??

    what is the major difference between null string and an empty string?? I wrote the following simple program and I could see some different output. Other than that, any other differences that we should pay attention to??? C:\>java TestCode Hello nullH

  • Schedule lines for outbound process

    hi can anyone tell me what is schedule lines for outbound process thanks

  • Why can't I open older files in InDesign6

    I have recently installed CS6 (teacher version) on my Windows XP operating system. when I try to open certain older files in InDesign, I get a message saying: "Cannot open (file name). Please upgrade your plug-ins to their latest versions, or upgrade

  • Copy item text in business transaction

    Hi, when copying a business transaction, I use function modules read_text and save_text to get the text from the original and save it to the copy. On header level this works fine (text is visible, order still not saved), on item level the copied text

  • Regarding Upgradtion Information

    Dear Guru    I just want to know that what are the things that are required when we upgrade the project from ECC 4.7 to ECC 6.0. If anybody have some document and anythings regarding this plz send to me... Thanks. Moderator message - Please search be