2 Replies Latest reply on Jul 22, 2009 1:58 PM by Peter deHaan

    TabNavigator blinking

    flairjax Level 1

      Anyone else seeing this issue? Create a tab navigator inside a popup, put in 3 tabs and inside each of those three tabs (vboxs) put <canvas><Vgroup><Hgroup>bunch of components</Hgroup></group></canvas>.

       

      When you run the app and the popup is displayed you are tab #1, click tab #3 and for me if the mouse is over the tab #3 when it opens the content will blink continously until you move your mouse of the selected tab ( off screen ).  If you leave the mouse over tab #3 it will blink forever until you remove your mouse.

       

      So to work around I tried createpolicy="all" so that the creation is all done at once for all tabs. The only issue I have a dropdownlist that should be populated in tab#3 but when you creationpolicy="true" and you move from tab#1 to tab#3 the dropdowlist will empty.  Maybe calling invalidateSize, invalide*..., etc... will work once tab#3 is active? So click tab#3 and when it becomes active have the tab nav change function tell the dropdowlist in tab#3 to in essenance refresh?

       

      Shouldn't have to do this but then the tab nav shouldn't blink.

       

      Jason

        • 1. Re: TabNavigator blinking
          flairjax Level 1

          So still not sure about the blinking situation, but to fix the empty dropdown I throw an event when my data gets set .

          • 2. Re: TabNavigator blinking
            Peter deHaan Level 4

            dallas,

             

            Can you please file a bug at http://bugs.adobe.com/flex and include a simple test case.

            I was unable to repro the behavior you describe using the following example:

             

            <?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/halo"
                    xmlns:local="*">
                <s:layout>
                    <s:VerticalLayout paddingLeft="20" paddingTop="20"/>
                </s:layout>
                <fx:Script>
                    <![CDATA[
                        import mx.core.IFlexDisplayObject;
                        import mx.managers.PopUpManager;
                        protected function btn_clickHandler(event:MouseEvent):void {
                            var poppy:IFlexDisplayObject = PopUpManager.createPopUp(this, TabNav, true);
                            PopUpManager.centerPopUp(poppy);
                        }
                    ]]>
                </fx:Script>
                <local:TabNav />
                <s:Button id="btn" label="Launchy" click="btn_clickHandler(event)" />
                <mx:Label id="sdkVer" initialize="sdkVer.text = 'Flex SDK Version: ' + mx_internal::VERSION;" />
            </s:Application>
            

             

            And my custom TabNav.mxml component/popup is as follows:

            <?xml version="1.0" encoding="utf-8"?>
            <mx:TabNavigator name="TabNav"
                    xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:s="library://ns.adobe.com/flex/spark"
                    xmlns:mx="library://ns.adobe.com/flex/halo"
                    width="550" height="400">
                <fx:Script>
                    <![CDATA[
                        import mx.managers.PopUpManager;
                    ]]>
                </fx:Script>
                <mx:Canvas label="Tab Number One">
                    <s:VGroup>
                        <s:HGroup>
                            <mx:ColorPicker id="cp1"
                                    initialize="cp1.selectedIndex = Math.random() * cp1.dataProvider.length;" />
                            <mx:DateChooser baseColor="{cp1.selectedColor}" />
                            <mx:DataGrid baseColor="{cp1.selectedColor}" />
                        </s:HGroup>
                        <s:Button id="closeBtn"
                                label="Close PopUp"
                                click="PopUpManager.removePopUp(this);"
                                initialize="closeBtn.includeInLayout = this.isPopUp;" />
                    </s:VGroup>
                </mx:Canvas>
                <mx:Canvas label="Tab Number Two">
                    <s:VGroup>
                        <s:HGroup>
                            <mx:DateChooser baseColor="{cp2.selectedColor}" />
                            <mx:DataGrid baseColor="{cp2.selectedColor}" />
                            <mx:ColorPicker id="cp2"
                                    initialize="cp2.selectedIndex = Math.random() * cp2.dataProvider.length;" />
                        </s:HGroup>
                    </s:VGroup>
                </mx:Canvas>
                <mx:Canvas label="Tab Number Three">
                    <s:VGroup>
                        <s:HGroup>
                            <mx:DataGrid baseColor="{cp3.selectedColor}" />
                            <mx:ColorPicker id="cp3"
                                    initialize="cp3.selectedIndex = Math.random() * cp3.dataProvider.length;" />
                            <mx:DateChooser baseColor="{cp3.selectedColor}" />
                        </s:HGroup>
                    </s:VGroup>
                </mx:Canvas>
            </mx:TabNavigator>
            

             

            Peter