Note that there are some explanatory texts on larger screens.

plurals
  1. POFlex AS3: ComboBox set visible to false doesn't hide
    primarykey
    data
    text
    <p>I have a combobox in a view that receives information about application state changes, and then is supposed to show or hide it's children based on the whole application state. </p> <p>It receives state change messages, it traces the correct values, it does what it's supposed to do, however, it just doesn't seem to work. Essentially, all it needs to do is hide a combobox during one state, and show it again during another state.</p> <p>Here is the code: </p> <pre><code>public function updateState(event:* = null):void { trace("Project Panel Updating State"); switch(ApplicationData.getSelf().currentState) { case 'login': this.visible = false; break; case 'grid': this.visible = true; listProjects.includeInLayout = false; listProjects.visible = false; trace("ListProjects: " + listProjects.visible); listLang.visible = true; break; default: break; } } </code></pre> <p>Here is the MXML:</p> <pre><code> &lt;mx:HBox&gt; &lt;mx:Button id="btnLoad" x="422" y="84" label="Load" enabled="true" click="loadProject();"/&gt; &lt;mx:ComboBox id="listProjects" x="652" y="85" editable="true" change="listChange()" color="#050CA8" fontFamily="Arial" /&gt; &lt;mx:Label x="480" y="86" text="Language:" id="label3" fontFamily="Arial" /&gt; &lt;mx:ComboBox id="listLang" x="537" y="84" editable="true" dataProvider="{langList}" color="#050CA8" fontFamily="Arial" width="107" change="listLangChange(event)"/&gt; &lt;mx:CheckBox x="830" y="84" label="Languages in English" id="langCheckbox" click='toggleLang()'/&gt; &lt;/mx:HBox&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload