[ 
https://issues.apache.org/jira/browse/FLEX-33922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13840402#comment-13840402
 ] 

Alex Harui commented on FLEX-33922:
-----------------------------------

Seems to be something funky in VBox's skin.  Can you try using NavigatorContent 
instead?  I did this and it appeared to work:

{code}
<?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>
        <fx:Component className="VNavigatorContent">
            <s:NavigatorContent>
                <s:layout>
                    <s:VerticalLayout />
                </s:layout>
            </s:NavigatorContent>
        </fx:Component>
    </fx:Declarations>
    <fx:Script> 
        <![CDATA[ 
            import mx.containers.VBox; 
            import spark.components.VGroup;
            private function testing():void {   
                var newVBox:VNavigatorContent = new VNavigatorContent(); 
                newVBox.label = "aa";   
                newVBox.id = "aa";      
                TelaLocal.addChild(newVBox); 
                
                var newVBox2:VNavigatorContent = new VNavigatorContent(); 
                newVBox2.label = "bb";  
                newVBox2.id = "bb";     
                newVBox2.enabled = false; 
                TelaLocal.addChild(newVBox2); 
                
                var formChildren3:Array = TelaLocal.getChildren(); 
                for each(var currentVBox3:VNavigatorContent in formChildren3){  
                    currentVBox3.setStyle('backgroundColor',0x003300); 
                }       
            } 
            private function testing2():void {  
                var formChildren4:Array = TelaLocal.getChildren(); 
                for each(var currentVBox4:VNavigatorContent in formChildren4){ 
                    currentVBox4.enabled = true;        
                } 
                TelaLocal.validateNow(); // or this.validateNow(); 
            } 
        ]]> 
    </fx:Script>        
    <mx:TabNavigator id="TelaLocal" width="100%" height="100%"/> 
    <s:Button x="201" y="73.1" label="1) Press first here" id="aaaaaaa" 
click="{testing()}" width="150"/> 
    <s:Button x="401" y="73.1" label="2) Then here" id="bbbbbbb" 
click="{testing2()}" width="150"/> 
    <s:TextInput x="201" y="120" width="100">   </s:TextInput> 
    <s:TextInput x="201" y="180" width="100">   </s:TextInput> 
    <s:TextInput x="201" y="220" width="100">   </s:TextInput> 
    
</s:Application> 
{code}

> validateNow() Freezes the browser
> ---------------------------------
>
>                 Key: FLEX-33922
>                 URL: https://issues.apache.org/jira/browse/FLEX-33922
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: mx: Box View
>    Affects Versions: Apache Flex 4.9.0, Apache Flex 4.10.0, Apache Flex 
> 4.11.0, Apache Flex 4.12.0
>         Environment: Windows 8, tested on Chrome, Mozilla and Internet 
> Explorer
>            Reporter: Thiago Maia
>
> Whats happen:
>   When try to set a color for a vbox background and activate it, it will 
> froze.
>   Can be tested on this link;
> http://www.a00s.com/teste2013/vbox/TesteVbox.html
>   Project for Eclipse is here
> http://www.a00s.com/teste2013/vbox/TesteVbox.rar
> Expected;
>   Vbox activated for use
> -------------------------------------------------------------------
> This sequence make it freezes
> currentVBox3.setStyle('backgroundColor',0x003300);
> then enable a disable VBox
> currentVBox4.enabled = true;
> then validate
> TelaLocal.validateNow();
> or
> this.validateNow();
> below the full code:
> TesteVBox.mxml
> ------------------------------------------------------------------------------------------------
> <?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:Script>
>               <![CDATA[
>                       import mx.containers.VBox;
>                       private function testing():void {                       
>                               var newVBox:VBox = new VBox();
>                               newVBox.label = "aa";   
>                               newVBox.id = "aa";                              
>                                 
>                               TelaLocal.addChild(newVBox);
>                               
>                               var newVBox2:VBox = new VBox();
>                               newVBox2.label = "bb";  
>                               newVBox2.id = "bb";                             
>                                 
>                               newVBox2.enabled = false;
>                               TelaLocal.addChild(newVBox2);
>                               
>                               var formChildren3:Array = 
> TelaLocal.getChildren();
>                               for each(var currentVBox3:VBox in 
> formChildren3){                               
>                                       
> currentVBox3.setStyle('backgroundColor',0x003300);
>                               }                               
>                       }
>                       private function testing2():void {                      
>                               var formChildren4:Array = 
> TelaLocal.getChildren();
>                               for each(var currentVBox4:VBox in 
> formChildren4){
>                                       currentVBox4.enabled = true;            
>                 
>                               }
>                               TelaLocal.validateNow(); // or 
> this.validateNow();
>                       }
>               ]]>
>       </fx:Script>    
>       <mx:TabNavigator id="TelaLocal" width="100%" height="100%"/>
>       <s:Button x="201" y="73.1" label="1) Press first here" id="aaaaaaa" 
> click="{testing()}" width="150"/>
>       <s:Button x="401" y="73.1" label="2) Then here" id="bbbbbbb" 
> click="{testing2()}" width="150"/>
>       <s:TextInput x="201" y="120" width="100">       </s:TextInput>
>       <s:TextInput x="201" y="180" width="100">       </s:TextInput>
>       <s:TextInput x="201" y="220" width="100">       </s:TextInput>
> </s:Application>



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to