Events with label, TextInput, and list

Hello

I'm with yet another problem.

So, I have a list on a page with a bunch of items in there.

On the same page is a TextInput which takes something from the user.

According what is selected in the list, this entry (in the TextInput) is changed on label and displayed on the screen.

I did a job, but it doesn't seem to work, the code I use is below.

In addition, if you look at the code, I use my table as:

var fromArray:Array = new Array({label: 'Thing1'},
                {label: 'Thing2'});

And I always use the index number in the eventListener. This seems a bit heavy. Is any way for him to seek the 'label' name... i. e Thing1 and Thing2 rather than the index = 0 and index = 1.

Here's the rest of my code:

package
{   

    import flash.display.Sprite;
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.filesystem.File;
    import flash.net.SharedObject;
    import flash.text.TextField;
    import flash.text.TextFieldType;

    import qnx.ui.data.*;
    import qnx.ui.display.Image;
    import qnx.ui.events.ListEvent;
    import qnx.ui.listClasses.*;
    import qnx.ui.skins.picker.*;
    import qnx.ui.text.*;

    public class DistanceWindow extends Sprite
    {
        private var textInput:TextInput;
        private var inputNumber:int = new int();

        private var outMeterLabel:Label;
        private var outMeterNumber:int = new int();

        public function DistanceWindow()
        {
            drawDistanceWindow();
        }

        public function drawDistanceWindow():void {         

            var fromArray:Array = new Array({label: 'Thing1'},
                {label: 'Thing2'});

            var fromList:List = new List();
            fromList.setSkin(ListCellRenderer);
            fromList.width = 250;
            fromList.height = 400;
            fromList.alpha = 1.0;
            fromList.x = 100;
            fromList.y = 100;
            fromList.rowHeight = 25;
            fromList.dataProvider = new DataProvider(fromArray);
            fromList.selectionMode = ListSelectionMode.SINGLE;
            fromList.allowDeselect = false;
            fromList.selectedIndex = 0;
            fromList.addEventListener(ListEvent.ITEM_CLICKED, listItemClicked);
            addChild(fromList);

            textInput = new TextInput();
            textInput.setSize(250,40);
            textInput.prompt = "Input";
            textInput.setPosition(387,150);
            textInput.textField.restrict = "0-9 \.";        // Restrict to only numbers from 0 to 9 AND the period (decimal) i.e. hex 2E
            textInput.addEventListener(Event.CHANGE, inputNumberEntered);
            addChild(textInput);

            outMeterLabel = new Label();
            outMeterLabel.text = "outMeterLabel";
            addChild(outMeterLabel);
        }   

        private function inputNumberEntered(e:Event): void {
            inputNumber = e.target.toString();

        }

        private function listItemClicked(e:ListEvent): void {
            var indexClicked:int = new int()
            indexClicked = e.index;

            if(indexClicked == 0) {
                outMeterNumber = inputNumber*0.01;
                outMeterLabel.text = outMeterNumber.toString();
            }
        }

    }
}

Any help would be great!

Thank you!

G

Hey gpatton,

I went through the code and made a few Chang to get what I think you want. first thing I did was subject to available fromList to all functions within this application by moving outside the constructor. second thing, it is that I converted your ourmeternumber a number instead of an Int object so that we can see decimal and not only the portion of the whole number of the result. last thing that I did, assuming you want to see a change, whenever a user changes the value of the input text entry was to take the function listItemClicked function and place it in the inputNumberEntered function. so now, the entry is changed each time so the value of the label. the changes I made are in bold. Note also I removed the "new int()" portions of your code. they are not required. This also applies to digital objects and string.

DistanceWindow.as:

package{ 

  import flash.display.Sprite;  import flash.events.Event;    import flash.events.MouseEvent;   import flash.filesystem.File; import flash.net.SharedObject;    import flash.text.TextField;  import flash.text.TextFieldType;

  import qnx.ui.data.*; import qnx.ui.display.Image;  import qnx.ui.events.ListEvent;   import qnx.ui.listClasses.*;  import qnx.ui.skins.picker.*; import qnx.ui.text.*;

  public class DistanceWindow extends Sprite    {     private var textInput:TextInput;      private var inputNumber:Number;

      private var outMeterLabel:Label;      private var outMeterNumber:Number;

      private var fromList:List;       

      public function DistanceWindow()      {         drawDistanceWindow();                 }

      public function drawDistanceWindow():void {         

          var fromArray:Array = new Array({label: 'Thing1'},                {label: 'Thing2'});

          fromList = new List();            fromList.width = 250;         fromList.height = 400;            fromList.alpha = 1.0;         fromList.x = 100;         fromList.y = 100;         fromList.rowHeight = 25;          fromList.dataProvider = new DataProvider(fromArray);          fromList.selectionMode = ListSelectionMode.SINGLE;            fromList.allowDeselect = false;           fromList.selectedIndex = 0;           fromList.addEventListener(ListEvent.ITEM_CLICKED, listItemClicked);           addChild(fromList);

          textInput = new TextInput();          textInput.setSize(250,40);            textInput.prompt = "Input";           textInput.setPosition(387,150);           textInput.textField.restrict = "0-9 \.";        // Restrict to only numbers from 0 to 9 AND the period (decimal) i.e. hex 2E          textInput.addEventListener(Event.CHANGE, inputNumberEntered);         addChild(textInput);

          outMeterLabel = new Label();          outMeterLabel.text = "outMeterLabel";         addChild(outMeterLabel);              }   

      private function inputNumberEntered(e:Event): void {          inputNumber = e.target.text.toString();

          if (fromList.selectedIndex > -1)           {             if (fromList.selectedIndex == 0)              {                 outMeterNumber = inputNumber*0.01;                    outMeterLabel.text = outMeterNumber.toString();               }         }

      }

      private function listItemClicked(e:ListEvent): void {         var indexClicked:int;            indexClicked = e.index;

          if(indexClicked == 0) {               outMeterNumber = inputNumber*0.01;                outMeterLabel.text = outMeterNumber.toString();           }     }

  }}

Oh yah also in the inputNumberEntered function, I've changed the first line to:

inputNumber = e.target.text.toString();

You had right idea just forgot to go a step deeper and get the text property of the TextInput.

also its worth noting that I've seen a weird phenomenon when the TextInput value is really high. the reported numbers of return are not accurate at all. Try to go... 1.12.123 1234... and so on until what u hit 123456789. It will begin to do some weird stuff after u pass this point. Assuming that your numbers will get very high that it may not be a problem.

hope that helps. Good luck!

Tags: BlackBerry Developers

Similar Questions

  • Works with dynamic sql and list of numbers as return value

    Hello.

    Problems:

    1. How can I insert the USERNAME variable in the string so it will be replaced over time.
    2. I intend to return a list of IDS as 1,4,6,7,2 I want to use later in an IN clause.

    How to complete the return function with the dynamic sql output variable?
    I have no preference to dynamic sql but it was just something that came into my mind
    When I thought that the implementation of the obligation to choose a list of offices for specific user groups.
    (select statements from the sample are cut short, they're actually really big and I want to reuse this function in my)
    BI Publisher data model for multiple modells).


    CREATE or REPLACE FUNCTION F_OFFICES (-input parameters)
    USERNAME IN VARCHAR2
    USERGROUP IN VARCHAR2,
    )
    -Output parameter
    RETURN VARCHAR2 AS
    dynSQL VARCHAR2 (1000);
    BEGIN

    IF USERGROUP = "local" THEN

    dynSQL: = 'xxx SELECT FROM CO_B WHERE Userid = username';

    ELSIF USERGROUP = "regional" THEN

    dynSQL: = "SELECT...". » ;

    ELSIF USERGROUP 'federal' = THEN
    dynSQL: = "SELECT...". » ;

    END IF;

    EXECUTE IMMEDIATE dynSQL;

    -RETURN?;

    END F_OFFICES;


    Thanks for any help.

    As you have presented essentially pseudo-code we can only give you a Pseudo-solution :)

    But the principle is:

    ...
    --Output parameter
    RETURN VARCHAR2 AS
        dynSQL VARCHAR2(1000);
        return_value varchar2(30):
    BEGIN
    
      IF USERGROUP = 'local' THEN
        dynSQL:= 'SELECT xxx FROM CO_B WHERE userid = :1'; -- placeholder for parameter
    
       ...
      END IF;
    
      EXECUTE IMMEDIATE dynSQL
         using USERNAME -- pass parameters in placeholder order
         into return_value;   -- obviously this must match the projection of the dynamic query 
    
      RETURN return_value; 
    
    END F_OFFICES ;
    

    This approach is not good if you want to vary the dynamic query projection. In this case, you can use a REF CURSOR or maybe DBMS_SQL.

    Cheers, APC

  • Checkbox labels disappear and colors modified during export to interactive PDF

    I did an InDesign document that contains two simple text boxes: one containing the word 'Yes' – the other containing the word 'no '. The background color of these two boxes are defined as 100% Cyan. After that, I have converted both of them boxes [(voir 1) in the illustration below].

    But when you export as interactive PDF, the background color of change boxes 17/11/0/0 and the 'yes' and ' no. "-labels are not visible in the exported PDF document [(voir 2) in the illustration below]."»

    However, when you click on the box in Acrobat, the box contains its original color 100% cyan and label and check mark appears [(voir 3) in the illustration below].

    But when I click on an empty space outside the box, the box label disappears again, and the background color changes again in 17, 11, 0, 0 [(voir 4) in the illustration below].

    My intention is that, when you view the document in Acrobat Reader, check boxes 100% Cyan with labels 'Yes' and 'No' obvious, when you click on one of them, the check box appears and background color remains 100% Cyan and the labels remain visible - also when you click off the beaten later.

    I'm doing something wrong, or is this a software problem?

    I appriciate all the tips and tricks on how to achieve my goal. Thanks in advance!

    CheckBox.jpg

    In the acrobat preferences, try to stop to see the color of the stationary border for fields, or change the field highlight color.

  • Creating a homepage for Apex using horizontal Images with label list?

    Hello

    I am trying to create a homepage for my application, which contains some intro text and images that would like specific interactive apex reports.

    However, I created a list using the horizontal Images with the list of the label template and during execution of the page - no images are displayed - it just displays the missing image icon

    The question I have, this is where are these defined images and how do I add a custom image for each item in the list

    You can do it in the apex by simply using a predefined list templates or even customize existing list templates.

    I suggest you to go through the sample application and try to understand how the entries in the list are defined and where to use the IMAGES.

    In the APEX of the layout defined in the templates page and the positioning of regions (lists in your case) are based on their Display Position

    Pass by this
    http://docs.Oracle.com/CD/E23903_01/doc/doc.41/e21674/nav_list.htm#CACCJHEE

  • Feed the list component with labels that have only certain values.

    I have to be able to sort out shorter labels in the component 'listHolder.list' by values in 'Fan', 'Herdighet', etc., which will be selected of the other items in the list
    (those who do not need to be fed by XML, but the list items own dataProvider)

    Practical example: displays only the labels in listHolder.list that are connected to the "H1" value in "Herdighet" or "H2" "Herdighet" etc.

    I am fairly new to AS3, so I do not know how to start. I appreciate everything you can give clues.

    Here's the code so far:

    //--------------------------

    var loader: URLLoader = new URLLoader();

    loader.addEventListener (Event.COMPLETE, onLoaded);

    listHolder.list. addEventListener (Event.CHANGE, itemChange);

    function itemChange(e:Event):void {}

    var selectedObj:Object = a [listHolder.listSelectedIndex]

    var xml;

    var a: Array = [];

    function onLoaded(e:Event):void {}

    XML = new XML (e.target.data);

    var it: XMLList = xml. Lauvtre;

    for (var i: uint = 0; i < il.length (); i ++) {}

    listHolder.list.addItem ({.child('Botanisk_navn').toString ()label: it [i]+ "\n"+ "-" + it [i].child('Norsk_navn').toString () "});

    a [i] = {'Fan': it [i].child('Farge').toString (), 'Herdighet': it [i].child('Herdighet').toString (),}

    "Høyde": he [i].child('hoyde').tostring (), "Botanisk_navn": he [i] .one ('Botanisk_n avn') m:System.NET.SocketAddress.ToString (),.

    'Norsk_navn': it [i].child('Norsk_navn').toString (), 'Image': it [i] .child ('image'). toString(),

    {"Blomstring": he [i].child('Blomstring').toString (), "Lysforhold": he [i] .one ('Lily book') m:System.NET.SocketAddress.ToString ()};

    }

    }

    Loader.Load (new URLRequest ("lauvtre.xml"));

    Fusion is a good thing.  The more you have to understand this, easy it all comes together when the lights start to go.

    In regard to the 'a' table... If you look at how values are it is attributed originally, they are attributed to the 'i' value of the index.  So, if the first element that passes the test of H1/H2 is the 10th 'i', it means that 10 of the table value is assigned to the first value you found.  The first 9 values in the table are zero as a result.

    But if you use the method push of the array class.

    a.push ({"Fan": he [i].child('Farge').toString (),... etc...});

    then the item is added to the index of the table rather than the 'i' the next clue.  If a table will have the same number of elements as the list and the list and table will agree in regard to pair them up.

  • I need a list send me Windows based utility of magnification for XP, am a MSN user with vision problems and cannot zoom in easily on what I have.

    I need a list, sent me to my XP Windows-based magnification utilities, am a user of MSN base with vision problems and cannot zoom in with what I have, and the work of the "Magnifier" somewhat well but could use something better.

    Any ideas?

    Hello

    Please refer to the links and check if it helps.

    How to set accessibility features for people who are blind or who have low vision in Windows XP

    http://support.Microsoft.com/kb/308978

     

    Windows XP accessibility tutorials

    http://www.Microsoft.com/enable/training/windowsxp/default.aspx

    Overview of the magnifying glass

    http://www.Microsoft.com/resources/documentation/Windows/XP/all/proddocs/en-us/magnify_about.mspx?mfr=true

    I hope the information is useful!

  • With the help of QProperty for a label inside the list view

    Hello

    I wanted to assign the value of a label in the list view to a string QPROPERTY. I did it using Qt.myname = _app. QPropertyName. And Qt.myname attributed to label.

    It updates correctly during installation. But if I change the value, it is not updated within the display list, but working in another label that is outside the view of the list.

    It works for me

            ListView {
                property string myCppProperty: app.cppProperty
                listItemComponents: [
                    ListItemComponent {
                        Container {
                            id: listItemContainer
                            Label {
                                text: listItemContainer.ListItem.view.myCppProperty
                            }
                        }
                    }
                ]
            }
    
  • Why Adobe 64 Flashutil is listed as a process in my task with Windows 7 and IE 11 Manager utility

    Why Adobe 64 Flashutil is listed as a process in my task manager utility with Windows 7 and IE 11?    What is and what is its role?

    Thank you

    TomS

    It's an artifact of sandboxing (https://en.wikipedia.org/wiki/Sandbox _ (computer_security)).   The part of Flash Player dealing with untrusted content on the web is running as a low integrity process.  When Flash Player needs more privileges on the system, there is a much smaller medium integrity process called the broker who made these requests on behalf of the low integrity process.  It is a defense in depth mechanism to make it more difficult for an attacker to exploit a crash in a way that allows them to control the larger system.

  • I try to enter the serial number to register my software, but the label outside of the box, he's starting with the letters and it does not accept the letters... . Only numbers

    I try to enter the serial number to register my software, but the label outside of the box, he's starting with the letters and it does not accept the letters... . Only numbers

    Serial numbers contain no letters, so maybe it's your redemption code, for use on adobe.com to get your serial number.

    Here are a few links to look for more information

    https://helpx.Adobe.com/x-productkb/global/redemption-code-help.html#productboxorprepaidca rd

    Quickly find your serial number

  • Height of a VBox with label and wrapped text

    Hello

    I have a VBox with label and text wrapped inside. The sentence in the text are from an external location and load in the text. I want to know the height of the VBox after that the text was being wrapped and place inside the VBox.

    I used all the properties for VBox as getHeight(), getPrefHeight(), getMinHeight() and getMaxHeight(), but these properties give me what I want.

    Is there another property I am missing or is a short coming of VBox?

    If this is a shortcoming of VBox, what other solution do I?

    Thank you

    AA

    You can register a listener with heightProperty() of the vbox and get it when it changes.

  • Custom problem with CFINPUT, masks and onFocus events

    I'm running into an interesting problem, I found a bug in ColdFusion MX 7.0.2 on Windows Server 2003. I have a CFINPUT field with a mask and an onFocus event. When the page is rendered, however, the resulting HTML code has two events onFocus with my called twice and the mask function, called only once. I was able to work around this problem, but it is kind of annoying. See the example below:

    It's not a bug it's a feature, depending on your point of view. Focuses on the first field with a mask using the mask attribute. Your code runs subsequently.

  • With the help of event with edge to animate and to Captivate listeners

    I just finished to design and develop a custom table of contents on board animate and connected to "get/set" information of Captivate 9.0.2. When you click on a button of Captivate within the project, it will trigger the animation of the table of contents to play, information display you. However, the narrow closure of TOC button is edge animate. When you click the close button in the animation animate dashboard, the animation of the table of contents will reverse play. I also nicely put in place so that the audio/video on the Captivate slide will pause when the table of contents is visible and continue to play when the table of contents are hidden.

    Here's my problem: when you reach the end of the slide and open the edge animate TOC everything behaves as it should. When you then close the border lead the table of contents, the Captivate project continues to play to advance to the next slide. I need that remains in pause/stop until the learner clicks on the button "Next" to move forward. I'll have a hard time integrating event listeners CPAPI_MOVIEPAUSE, CPAPI_MOVIERESUME and CPAPI_MOVIESTOP while maintaining a successful communication between Captivate and animate dashboard. Does anyone know how to get there? Thank you!

    As I do this is to add a variable to the cpInfoCurrentFrame change event listener at the same time the listener to slides of entry. You check if you have reached the end of the slide and to set a variable. If you put this in the head of the index.html:

    var interfaceObj, eventEmitterObj, CSTO = 0; endSlide = false;

    window.addEventListener ("moduleReadyEvent", function (e)
    {
    interfaceObj = e.Data;
    eventEmitterObj = interfaceObj.getEventEmitter ();
    initializeEventListeners();
    });

    function initializeEventListeners()
    {
    If (interfaceObj)
    {
    If (eventEmitterObj)
    {
    eventEmitterObj.addEventListener ("CPAPI_SLIDEENTER", function (e)
    {
    endSlide = false;
    CSTO = e.Data.to;
       
    window.cpAPIEventEmitter.addEventListener ("CPAPI_VARIABLEVALUECHANGED", function (e)
    {
    If (e.Data.newVal > CSTO - 5)
    {
    endSlide = true;
    }}, "cpInfoCurrentFrame".
    );
    });
    }
    }
    }

    Then in the dashboard check file the value of endSlide (window.parent.window.endSlide), if it is true not to resume.

  • How to select all the text with QNX TextInput

    With QNX TextInput, is there a way to select all the text? Spark TextInput a selectAll() method to select all text, but I do not see a similar method in QNX TextInput. No idea how you can choose all the texts with QNX TextInput. Thank you.

    Hey French,.

    Thanks for the clarification! I think I can help you. Here is a code example to show my explanation. In the code below when a user clicks the LabelButton object it will assign the focus to your TextInput object and then select all the text in this object. The only downside is that it will not bring the keyboard. so far, we are not successfully by invoking the keyboard without the user clicking on the TextInput. in any case in the code below, we use TextInput property the textField object as a reference to the TextField object internal. from there, we use the setSelection() method to select the text inside the object from the start to the end position pos. Here's the same code:

    package
    {
        import flash.display.Sprite;
        import flash.display.StageAlign;
        import flash.display.StageScaleMode;
        import flash.events.FocusEvent;
        import flash.events.MouseEvent;
    
        import qnx.ui.buttons.LabelButton;
        import qnx.ui.text.TextInput;
    
        [SWF(width="1024",height="600",backgroundColor="#CCCCCC",frameRate="30")]
        public class TextInputTest extends Sprite
        {
    
            private var myInput:TextInput;
    
            public function TextInputTest()
            {
                super();
    
                // support autoOrients
                stage.align = StageAlign.TOP_LEFT;
                stage.scaleMode = StageScaleMode.NO_SCALE;
    
                myInput = new TextInput();
                myInput.setSize(300,50);
    
                addChild(myInput);          
    
                var newBtn:LabelButton = new LabelButton();
                newBtn.label = "Click Me";
                newBtn.setPosition(325, 0);
    
                newBtn.addEventListener(MouseEvent.CLICK, selectMyText);
    
                addChild(newBtn);
    
            }
            private function selectMyText(e:MouseEvent):void
            {
                stage.focus = myInput;
                myInput.textField.setSelection(0, myInput.textField.length);
            }
        }
    }
    

    hope it's what you want. Good luck!

  • problem with index on a list of variants

    Hi, im working with a variant property list and index property int for the passage of the current 5 days and back temperature seems to work, but it has some problems, first of all, instead of the current temperature, I got 0 and then when I get to the day 4 me sends to the current day, and when I am right now (jsonweather.temp in the list) I spend twice for him , I increase the index on the shot upwards and taper sliding down like that

    Page {
    
    property variant list
    property int index: 0
    
    list: [ jsonweather.temp,
            jsonweather.tempMax1,
            jsonweather.tempMax2,
            jsonweather.tempMax3,
            jsonweather.tempMax4,
            jsonweather.tempMax5 ]
    
    function setIndex(_index){
            index = _index
        }
    function temperatureChanges(index){
            if(_WeatherNow.useFarenheit == true){
                weatherDataTemperature.text = Math.round((list[index])*1.8+32);
           } else{
                  weatherDataTemperature.text = Math.round(list[index]);
                }
        }
    
    Container {
            id:swipeContainer
    
            property int swipeThreshold: 100
            property double swipeStartPosX: -1
            property double swipeStartPosY: -1
            property double swipeLastKnownPosX: -1
            property double swipeLastKnownPosY: -1
            property bool swipeStart: false
            property bool swipeMove: false
    
    attachedObjects: [
    PositionSource {
                id: positionSource
                //! Desired interval between updates in milliseconds
                updateInterval: 10000
                //! When position changed, update the location strings
                onPositionChanged: {
                    currentCoord = positionSource.position.coordinate;
                    latitude = Math.round(currentCoord.latitude*1000)/1000;
                    longitude = Math.round(currentCoord.longitude*1000)/1000;
                    console.debug("Latitude: " + latitude, "Longitude: " + longitude);
                    positionSource.stop();
                    // start loading weather data for location
                    jsonweather.getWeatherdata(latitude, longitude);
                    jsonweather.onGetReply(loading.stop())
                }
            },
            ExternalIP {
                id : jsonweather
                onNameChanged: {
                    weatherDataCity.text = name;
                }
                onDescriptionChanged: {
                    weatherDataCondition.text = list2[index2];
                }
                onHumidityChanged: {
    
                }
                onTempChanged: {
                if(_WeatherNow.useFarenheit == true){
                weatherDataTemperature.text = Math.round((list[index])*1.8+32);
                } else{
                weatherDataTemperature.text = Math.round(list[index]);
                }
    }
            ]
            function processSwipe() {
                var horz = swipeContainer.swipeLastKnownPosX - swipeContainer.swipeStartPosX;
                var vert = swipeContainer.swipeLastKnownPosY - swipeContainer.swipeStartPosY;
    
                if (Math.abs(vert) > swipeThreshold) {
                    if (vert > 0) {
    
                        if(index > 0) temperatureChanges(index--)
                        else index = list.length - 1
    
                    }
                    else if (vert < 0) {
                        //swipe up
                        if (index < list.length - 1) temperatureChanges(index++)
                        else index = 0
                }
    }
                if (Math.abs(horz) > Math.abs(vert)) {
                // Moving horizontally: refresh information
                if (Math.abs(horz) > swipeThreshold) {
                    if (horz < 0) {
    
                             loading.start()
                             positionSource.start()
                             temperatureChanges(index)
    
                    } else if (horz > 0) {
                        temperatureChanges(index)
                    }
    
    }
            }
            }
            onTouch: {
                if (event.isDown()) {
                    swipeContainer.swipeStartPosX = event.windowX;
                    swipeContainer.swipeStartPosY = event.windowY;
                    swipeContainer.swipeStart = true;
                } else if (event.isMove() && swipeStart) {
                    swipeContainer.swipeMove = true;
                    swipeContainer.swipeLastKnownPosX = event.windowX;
                    swipeContainer.swipeLastKnownPosY = event.windowY;
                } else if ((event.isUp() || event.isCancel()) && swipeContainer.swipeMove) {
                    swipeContainer.swipeStart = false;
                    swipeContainer.swipeMove = false;
                    processSwipe();
                }
            }
    onCreationCompleted: {setIndex(0)}
    }
    

    This code seems very strange to me...

    if(index > 0) temperatureChanges(index--)
    else index = list.length - 1
    

    If it should not change anything...

    if(index > 0) index--
    else index = list.length - 1
    temperatureChanges(index)
    

    Ditto for increase the index in the code a little later, the.

    I do not say that it is something to do with your problem, that there should be further analysis, but this code seemed to me odd right now.

  • Re: problem with menu drop-down lists.

    Hello everyone,

    I am facing a problem with the drop-down lists in my application, I have 4 drop-down lists one under the other. The main problem follows here, the second list is being covered by the first list when the first list fell down. How to get rid of it, any suggestions please,

    Thank you and happy new year.

    You must listen to the update and then change the order of objects.  Seems odd that RIM does not perform this themselves because it is a problem long been known.  A few other controls have similar problems.

    Community Library:

    import flash.events.Event;
        import flash.events.FocusEvent;
    
        import qnx.ui.listClasses.DropDown;
    
        public class DropDown extends qnx.ui.listClasses.DropDown
        {
            public var dataField : String = 'data';
            public var defaultSelection : * = '';
    
            /////////////////////////////////////////////////////////////////////////
            public function DropDown()
            {
                super();
                this.addEventListener(FocusEvent.FOCUS_IN, HasFocus );
            }
    
            ///////////////////////////////////////////////////////////////////////////
            private function HasFocus( event : Event ) : void
            {
                this.parent.setChildIndex( this, this.parent.numChildren-1 );
            }
    
            ////////////////////////////////////////////////////////////////////
            public function set selection( value : * ) : void
            {
                var entry   : Object;
                var counter : int = 0;
                for each( entry in this.dataProvider.data )
                {
                    if( entry[ this.dataField ] == value )
                    {
                        this.selectedIndex = counter;
                        break;
                    }
                    counter++;
                }
            }
    
            //////////////////////////////////////////////////////////////////////
            public function get selection() : *
            {
                return this.selectedItem ? this.selectedItem[ this.dataField ] : this.defaultSelection;
            }
        }
    

Maybe you are looking for

  • Halo 2:When I use my mouse on the line, the cursor movement is very slow and jerky.

    original title: halo 2 Hello... Just installed Halo 2 on my Windows 7, 64-bit desktop.  I have all the latest drivers. All other games work fine. When I use my mouse on the line, the cursor movement is very slow and jerky. Unplayable. I was looking f

  • (HELP NOW PLEASE) G60-230US boot loop

    I recently tried to get on my laptop HP (G60-230US) and that she would go to where it says ' from Windows... "and he should start for a few minutes, then my screen white flash, then go black and then return to"Starting Windows. "... "I tried to go to

  • Web link problem

    When I try and open a web link in an e-mail message for unknown reasons, that I now have the message:"This operation has been cancelled due to restrictions in effect on this computer. Please contact your system administrator. »It's a personal compute

  • matically key *.

    I boght windows 8 what wos the key He the mast upwards, I lost him soundcards 8 pro

  • Help, please! New Acer stuck on Please wait

    Hello I need a little help, my new Acer 8 tried windows computer to install updates that I allowed him to do, but for the last 13 hours, he is stuck on Please wait, I followed some instructions through this community but none worked, I can't get it i