How to delete all children of the ComboBox?

In my application, when you change the base state, all my drop-down list boxes are populated with the data.

I would like to 'reset' the drop-down list boxes when the State returns to the base.

I've written a loop that traverses all the children of a hBox (btnContainer) when the state changes back to the base.

I can reset a combobox as follows: colChart.ccCombo.data = null. Works well.

When I loop on children, I get a series of IDisplayObjects and I can not use the property data to set to null.

How can I set each ComboBox to null in the loop?

private function doDispose (): void {}
var ccTemp:ComboBox;

for (var i: int = 0; i < colChart.btnContainer.numChildren; i ++) {}
If (colChart.btnContainer.getChildAt (i) is ComboBox) {}
trace (colChart.btnContainer.getChildAt (i). (Name)

does not work

ccTemp = colChart.getChildAt (i) as ComboBox;
ccTemp.data = null;
}
}

}

Try:

ComboBox (colChart.getChildAt (i)) .dataProvider = null;

Alex Harui

Flex SDK Developer

Adobe Systems Inc..

Blog: http://blogs.adobe.com/aharui

Tags: Flex

Similar Questions

  • How to delete all TABLEs in the schema SYS that are created from 09:15?

    Unfortunately a script created a lot of tables in the diagram (= SYS) and bad Tablespace (= SYSTEM).

    How can I delete all TABLES that are created inTablespace = SYSTEM and SCHEMA = SYS (in a DDL command)
    respectively for the past 3 hours from 09:15 to 25 Sep 2011?

    Alternative: How can I move these tables in another schema (for example ATEST) and Tablespace (USERS)?
    Is this possible with Oracle XE or Oracle Enterprise?

    Peter

    You can use ALTER TABLE... MOVE. It offers a TABLESPACE clause, which allows you to choose a different tablespace as target. Refer to the documentation for your version of the database.

  • How to reach all children during the use of Propagation of the event?

    Hello

    I use the Propagation of the event in order to change the alpha of each child on MOUSE_OVER and MOUSE_OUT MOUSE_DOWN to help...

    evt. Target.Alpha

    More alpha of the child increases of 0-0.5.

    On OUT it is 0.5-0.

    On down, he goes to 0.5 and stays there even with a MOUSE_OUT.

    I want to do then is add a button to the main stage, that reduces the visibility of all children to 0, a base type of the clear button.

    I have a way to do where I list each child in a function (all 9!). But I can re - write this so that all children are required to write code so much?

    Ideally, I would like to send a request to find the number of children (9), then use this variable to write a function that says (where n is the name of the Instance of each child) than n(0-numChildren).alpha = 0

    Here is my code - very - long breath:

    clearBtn.addEventListener (MouseEvent.CLICK, ContainerAlpaReset, false, 0, true);

    musicContainer.addEventListener (MouseEvent.MOUSE_OVER, onMusicOver, false, 0, true);

    musicContainer.addEventListener (MouseEvent.MOUSE_OUT, onMusicOut, false, 0, true);

    musicContainer.addEventListener (MouseEvent.MOUSE_DOWN, onMusicClick, false, 0, true);

    var i: Number = 0.5

    function onMusicOver(evt:MouseEvent):void {}

    if (evt.target.alpha == 0)

    evt.target.alpha = 0.5;

    }

    function onMusicOut(evt:MouseEvent):void {}

    if (evt.target.alpha == I)

    evt.target.alpha = 0;

    else (evt.target.alpha = 1);

    }

    function onMusicClick(evt:MouseEvent):void {}

    evt.target.alpha = i + 0.5;

    }

    function ContainerAlpaReset(evt:MouseEvent):void {}

    musicContainer.n1.alpha = 0;

    musicContainer.n2.alpha = 0;

    musicContainer.n3.alpha = 0;

    musicContainer.n4.alpha = 0;

    musicContainer.n5.alpha = 0;

    musicContainer.n6.alpha = 0;

    musicContainer.n7.alpha = 0;

    musicContainer.n8.alpha = 0;

    musicContainer.n9.alpha = 0;

    removeEventListener (MouseEvent.CLICK, ContainerAlpaReset);

    }

    Is there a simple way to write the part in bold? That is to say:

    musicContainer. Children? .alpha = 0;?

    Or better yet, can I use numChildren count and then write a generic piece of code that adds each count to the n #?

    Thank you for all the answers!

    Try

    function ContainerAlpaReset(evt:MouseEvent):void {}

    for (var i: uint = 1; i<10;>

    musicContainer ["n" + String (i)] .alpha = 0;

    }

    removeEventListener (MouseEvent.CLICK, ContainerAlpaReset);

    }

  • CS5: How to delete all points of the width of a line?

    The width tool is cool, but how do I get rid of all the points that I created if I don't like them? I know that I can remove them with shift-click, but there is a lot of work and I'm not really sure that I receive all. Is there an all clear somewhere?

    Select the path and open the cover of the race. Looking for a drop-down list at the bottom marked profile. On this basis, select uniform.

    The same setting is available on the control panel and in the stroke settings in the appearance Panel.

  • BlackBerry smartphones how delete all entries in the address book of device and start again

    I want to delete all entries in the address book to Blackberry

    I want to re - sync with my contatcs current Outlook

    How do I do that?

    You must do so via the Desktop Manager. I'll give you the steps using the Desktop Manager v4.5:

    1. connect your BlackBerry to the computer via the USB cable and open the Desktop Manager.

    2. click on backup and restore

    3. click on the advanced under the section titled Advanced button

    4. on the next screen, on the right, select address book, then click the button clear down.

    It will delete the address book and leave it empty.

  • How to delete all my pictures on my phone s6?

    How to delete all my photos on my pone 6s?

    It depends on where the photos are mainly housed.

    Most of the information is here (from the iPhone user Guide):

    http://help.Apple.com/iPhone/9/#/iphf14943e

  • Z10 blackBerry how to remove all entries from the Local calendar?

    My calendar shows my email entered account and all is well.  However, I think that when I transferred all of my Bold 9900 he faces a bunch of entries in the local calendar (House) that I don't want.  I would like to delete all entries in the local calendar.  How can I do this?  Thank you!

    Unfortunately you can't remove individual events right now. The fastest way to remove events is the 'Month' tab, then tap and hold events in the list and select 'Delete' from the side menu.

  • How to delete a playlist from the iphone 6

    How to delete a playlist from the iphone 6

    Open iTunes, plug in the iPhone, what you select ant to be on the iPhone, sync

  • Delete all orders of the user at the same time?

    Hello

    There is nothing in the code to delete all orders of the user at the same time? (by code or function)

    Get all enable them command user?

    Thank you

    Hello Oz,

    Call ScriptCmdReset()

    to return to the State of brand new tiara, which, in most cases, unload all global variables and commands that you have created by program since then.

    Brad Turpin

    Tiara Prodcut Support Engineer

    National Instruments

  • Is it possible to delete all entries in the Eventvwr log?

    Separated from this thread.

    Is it possible to delete all entries in the Eventvwr log, so I can go back to that is the app is written in the Eventvwr log?

    By default, event viewer produced a considerable number of newspapers.

    The four elements of the menu in event viewer bar are file, Action, view and help.

    Clear a log only appears in the Action menu of drop-down menu if the cursor is placed in a newspaper that can be erased and a report in the list is not currently selected. So if it is placed on the option Windows logs clear a log is unavailable, while "subject of a report in a folder under five is not selected, the option clear a log is available."

    The three main Windows logs files are Application, security, and system. The default file for these logs size is 20, 480 KB, which is larger than necessary. A reasonable size is 2 048 KB. You can easily change the size immediately after clearing the log by using the scrollbar to the right of the maximum log size to change whatever size you choose. In the same time make sure that the box before overwriting is checked. All of your changes by clicking apply then OK. If you have not disabled the first newspaper the system prevents the selection of a maximum file size less than the size of the existing file.

    see that the app is written in the Eventvwr log?

    The system records the entries in the logs. The system monitors everything that happens. Individual applications do not write entries in the Event Viewer logs. It's the system that records the entries on startup applications, stop and crashing!

  • How to remove all information from the computer so I can sell it?

    How to remove all information from the computer so I can sell it?

    Hello

    You will want to format the hard disk:

    1. you can use DBAN - http://www.dban.org/

    or

    2. you can follow this tutorial to clean install up to the step where you format the disk, in which you would then STOP (because you just want to get rid of the files on the hard drive, do not install Windows) - http://www.sevenforums.com/tutorials/1649-clean-install-windows-7-a.html

    Kind regards

    Patrick

  • How to delete a contact in the menu 'To' drop down when starting a new email?

    How to delete a contact in the menu 'To' drop down when starting a new email?  Email is no longer in my list of contacts, but he continues to appear in the menu drop down and too often I am wrong send something to the wrong email since it is at the top of the drop-down list.

    2 possibilities:

    1. you have an invitation, that you still need to answer. The name stays on until you refuse the invitation. Then it will go away.

    Open outlook.com > top left, place your cursor on the Outlook logo > an arrow will appear > click on the arrow > click on people > here's the window of your people.
    Toolbar at the top, click on manage the > click on View Invitations > do you see an invitation? If so, decline the prompt will remove the names of th.
    2. There may be a suggestion of the application of the 'AutoComplete suggestion» It gives you the names so that you, at the same time, sent emails.
    You can remove this suggestion by doing this...

    Open outlook.com > top right, next to your name, click on the gear icon > click on e-mail settings more > under customization of Outlook, click Advanced Privacy settings > click the front point 'Only suggest people in my contact list' > click on save when finished.

    t-4-2

  • How to delete all the phone numbers in the blocked list?

    How can I delete all the phone numbers in the blocked list?

    I want to delete a large number of blocked number, but now I can't remove the numbers blocked by one, are there ways to eliminate several numbers or the complete list at the same time?

    Thank you!

    No sorry. The fastest method seems to be to go to settings > phone > blocked (or settings > Messages > blocked) and select the editing mode. You could make a suggestion to Apple that offer more options: http://www.apple.com/feedback/iphone.html

  • How can I delete all history on the compurter and user profiles?

    Original title: computer sales how to remove user profiles in windows 7

    How to remove all profiles user and history? Windows 7

    How to remove all profiles user and history? Windows 7

    Your best strategy is to perform a destructive factory restore. You can then sell the machine in "like -new" condition Consult the manufacturer's web page for detailed instructions.

  • How to delete all messages in a folder in the mail application

    I have a new Toshiba computer with a program of Windows 8. Is it possible to delete all of my junk mail at the same time?

    Original title: junk e-mail in Windows 8

    Hi Jack,

    Thanks for posting in the Microsoft Community.

    The question that you stated that you want to delete unwanted e-mails in the Mail application at the same time. We are here to help you.

    Here's what you need to do.

    a. open the folder in which you want to delete E-mails.

    b. Select one of the Emails.

    c. press the CTRL + A on the keyboard (this will select all Emails in the folder).

    d. press the clear key that will remove the selected emails.

    I hope this helps. If the problem persists or all windows related queries or questions, please get back to us. We are here to help you.

Maybe you are looking for

  • I want to upraise my iMac (15 January 2007) to the latest version

    January 15, 2007 bought 24 inch imac os x 24/2.16/1g/250/sd/ap/bt-itp Snow - 10.11.4 Hi, a long time ago I did not use my iMac and now does not work because there must be some update... How can I to bring back to life? I have to go to the Apple Store

  • I can no longer connect on one site-always says server busy code 27368

    I just can't connect you to a Web site - I get the message-"error code busy 27368 Server". I can connect to this site from other computers

  • write to excel file

    Hello! I am trying to generate an excel (.xls or .csv) file that contains four columns, each column data is an array of doubles. I tried several ways to get (using commas with tabs with xls and csv), but I'm not able to get the four columns of values

  • Impossible to activate webcam Lenovo S206-is

    I have a Lenovo Ideapad S206.  I can't get the camera is activated.  I get the message cannot open the camera.  I uninstalled and reinstalled. I tried downloading the drivers.  Nothing works.  When I turn on Skype I get message NO WEBCAM FOUND.  CONN

  • Aironet 1200 with a radio and 802.11 g

    Can an AP 1200 with an 'a' and 'g' radio be used as a bridge (for backhaul) "one" of the radio and a point of access to the radio of 'g' at the same time? Thank you Kim