ComboBox inside an ItemRenderer keeps going back to initial selectedIndex
Hi,
Thanks for taking a minute to help me solve this problem. I have the following component, what I want to do, is to save the selectedIndex on the data.selectedIndice variable. I have no trouble with that. The variable saves the correct new selected Index number, but the problem is that, for instance, if the initial selectedIndex was 0, and the user selects the third item of the ComboBox, the ComboBox will go back to selecting the 0 index (the new one was 3) even though that the seleccion.selectedIndex shows that 3 is selected (that's why data.selectedIndice saves 3)
<mx:HorizontalList
bottom="0"
backgroundAlpha="0.0"
id="catalogoOpciones"
columnCount="3"
height="80"
hideEffect="{esconderse}"
horizontalScrollPolicy="on"
selectable="false"
showEffect="{mostrarse}"
width="100%">
<mx:itemRenderer>
<mx:Component>
<mx:VBox height="100%" verticalGap="0" horizontalAlign="center" creationComplete="init()">
<mx:Label id="titulo" text="{data.nombre}" textAlign="center" styleName="nombreOpcionDetallePlato" />
<mx:ComboBox id="seleccion" dataProvider="{data.opciones}" labelField="label" labelFunction="funcionLabelComboBox" styleName="comboOpcionDetallePlato" change="changeHandler(event)" />
<mx:Script>
<![CDATA[
import menucomponents.clases.OpcionesEvent;
import mx.events.ListEvent;
import mx.controls.Alert;
public function init():void {
public function changeHandler(event:ListEvent):void {
Alert.show(seleccion.selectedIndex.toString); //this shows the correct new index selected data.selectedIndice = seleccion.selectedIndex; //at the beginning data.selectedIndice was 0, and when I change the selectedIdex, data.selectedIndice saves 1 } correct value, but the ComboBox shows on the screen that the selected item is the first one (index 0) and not the second one (index 1) AS IT'S SUPPOSED TO
public function funcionLabelComboBox(item:Object):String {
return item.label + ", $" + item.precio;
]]>
</mx:Script>
</mx:VBox>
</mx:Component>
</mx:itemRenderer>
</mx:HorizontalList>
Thanks for the help
Sebastián Toro O
selectedIndice is public. What's funny is that if I don't use the selectedIndex="{data.selectedIndice}" and I comment the line:
data.selectedIndice = seleccion.selectedIndex
Then the CombBox works just fine. It doesn't go back to the initial selectedIndex. I´m going to solve this using Events and an external Array (Array.length = ComboBox.dataProvider.length) to save the selectedIndex, it's a very un-elegant solution but i think it's going to work. Also I might add, that if I send an Event and catch it outside the List, and try to modify the data.selectedIndice, from the particular ComboBox that I changed, the ComboBox still changes automatically it's selectedIndex.
Thanks for your help.
If some day you think how to solve this, I would really appreciate if you post it here.
Sebastián Toro O.
Similar Messages
-
i downloaded firefox and said to import my favorites and stuff from my qwest homepage and can't find them . I have no tool box on any of my pages that I can drop down that says import. not on my old homepage or the firefox page. Help, i dont want to have to keep going back and forth
You can usually find the imported IE Favorites in a folder ("From Internet Explorer") at the bottom of the Bookmarks Menu folder (Bookmarks > Organize Bookmarks).
If you can't find them in the "From Internet Explorer" folder then try this:
* Export the favorites in IE to an HTML file (bookmarks.html): File > Import and Export
* Import the HTML file in Firefox: Bookmarks > Organize Bookmarks > Import & Backup > Import HTML: From File
See also:
* http://kb.mozillazine.org/Import_bookmarks ("Import from another browser" and "Import from file") -
i cant seem to sign in to facetime,ive put my email add in and my password but it just keeps going back to sign in ???
Welcome to the Apple Community.
Are you getting any messages about date and time.
Have you tried restarting the Apple TV by removing ALL the cables for 30 seconds.
Are you connected to the network correctly. -
their login page does not recognize my entry. Just keeps going back to page and says logon. It does work on Internet Explorer but not Firefox.
This - http://www.google.com/firefox - is the old Firefox Start Page used by the Firefox 3.6 and earlier versions of Firefox, I don't think it is being maintained.
Starting with the Firefox 4 version, Firefox is using a "local" Start Page with the address of '''about:home'''. It looks similar to the old Start Page, but it isn't exactly the same. -
Haven't used my Ipad for some time. Switched it on andup came énter PASSCODE''. I entered the correct Passcode and hit DONE but it just
keeps going back to énter Passcode'and wont let me go any further. Can anyone assist please with a reason for this and/or how to be able to get in.
Thanks.
Margii13http://support.apple.com/kb/ht1212
-
My IPAD keeps going back to the main menu screen everytime I try to access my email or FB or intertnet
Try this:
1. Double-click the Home button and hold apps in the Task Bar down until they all wiggle then tap the minus sign to close apps. Tap the home button to return to Home screen.
2. Hold the Sleep/Wake and Home button down until you see the Apple Logo. -
What is going on with itunes update? I keep getting the message that updates are available for itunes, safari and icloud, but when I accept the terms and conditions and the install 3 items message, it keeps going back to telling me there are 3 updates available and have to accept terms and conditions again without it ever installing!! I am using a PC with windows vista. Have not had this problem till December when I got an ipad and had icloud installed, don't know if there is a connection.
I can't offer any help but it soulds like Apple goofed with the latest update. Many of us have the same problem. I may wait a week or so to see if Apple responds.
-
Why does my ipod touch 4gen keeps going back to home page when browsing on the apps store
Why does my Ipod touch 4 generation keeps going back to home page when browsing in the apps store.
I called apple 5 times today and asked me to restore it 3x the problem still exists. This problem starts to occur yesterday after upgrading to IOS6.
Apple customer service is not good enough as they cannot fixed the problem or tell me that I can change the unit as I just bought this 2 months ago.Because there is a bug in iOS 6 that effects the 4G iPod touch.
https://discussions.apple.com/thread/4319809?tstart=0 -
Apple TV keeps asking me to enter my security code and I do and it keeps going back to the security code screen even tho my security code is correct and verified.
Click here and request assistance.
(91679) -
Why do i have to keep going back to home page in my e-mail
When Im on a web page in e-mail and I go to another from my email why do I have to keep going back to home button to get back to email?
Get back to where?
-
I have given my iPad and iPhone to my wife, she has synchronized with her Apple ID but it keeps going back to my Apple ID when she tries to purchase something in iTunes. Do I need to deregister the device and register it in her Apple ID?
What id shows at the bottom of the Featured tabs in the App Store apps on the two devices ? If they still show your account id then try tapping on the id and log out of it and your wife can then try logging in with her account.
Any content that is already on them that was downloaded by your account will remain tied to your account, so only your account will be able to download updates to your apps. -
my new email and new password is set up on i tones and not on my iphone 4 but under settins show my new email but my updates wont allow me to update it keeps going back to the old email and i dont use it any more
Did you change the email associated with your Apple ID or create a new Apple ID?
The former simply requires signing out of the iTunes store and back in with the new credentials.
The later is a waste of time as content acquired via iTunes is permanently tied to the Apple ID it was acquired with. -
Ipad 2 keeps going back to the restore screen even after being connected to itunes
I updated to the new operating system and updated itunes, but my ipad keeps going back to the start screen to set up. Any ideaS?
Connect to iTunes and restore.
-
My ipad keeps going back to "no SIM"? .
My iPad keeps going back to "no SIM" instead of AT&T 3G at top -- thus, I am unable to access WIGI / Cloud connections. What does that mean? Has never happened until I download the new iO7!
1. Close all inactive apps. Double-click the Home button and hold apps in the Task Bar down until they all wiggle then tap the minus sign to close apps. Tap the home button to return to Home screen.
2. Hold the Sleep/Wake and Home button down until you see the Apple Logo. -
Ipad keeps going back to homescreen when im using an app
Whenever im playing with my games, it keep going back to homescreen and I don't know what to, please help me fix it,
Try this - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.)
What model iPad and what iOS is it running? You may need to update the iOS.
Is this app the only one that does this? If so, it's probably a problem with the app software. Contact the app developer.
Cheers, Tom
Maybe you are looking for
-
My 2 weeks old T400 Vista home basic can start up successfully. But every time when I start or restart it, during the start process, after inputting the password, there are 4 times of black screen (or screen refresh). Is it normal? Thanks.
-
I've tried to start sqlplus on NT4 with socks5 because my database server is outside a firewall. The socks works fine on my machine (I can telnet the port 1521 of the db server, or do a tnsping), but sqlplus cannot contact the db. Can you help me ? T
-
Is it possible to sync a clip without using multicam ?
Hi there, I have some video clips recorded on 2 videos, we just say Video A & B. On the timeline, I mostly used clips from Video A. But for one 10 sec duration I prefer clip from Video B. How to I sync this 10-sec clip form video B to video A without
-
Cisco WCS on 64 bit Windows Server 2003
I have been running WCS 4.2.62.0 on Windows 2003 R2 64 bit for some time with no issues whatsoever. Today I attempted to upgrade to WCS 5.0.56.0 and the installation terminates stating that WCS is not supported on 64 bit. My question is why this is s
-
P67A-GD65 How to stop the motherboard from checking exteral drive when BIOS boot
I got four 2TB hard drives as external drives but every time when I restart my computer it takes so long to get pass the beeping phase. (At least 1 min) I unplug all USB hard drives leaving only a USB mouse and keyboard and it boots in seconds. So I