2 Replies Latest reply on Jan 31, 2010 2:31 PM by WG Edwards

    TabNavigator bug

    WG Edwards



      I have had lots of trouble with a bug in the TabNavigator. Either it's a bug in my code, or the TabNavigator itself.


      You can see the application working here:




      (You can view source by RMB clicking over it.)


      Set up:

      class Person

      - name:String

      - tickets: ArrayCollection //of Strings

      - software: ArrayCollection //of Strings


      If I have one class, say Person, that encapsulates a name, and 2 array collections say a collection of Tickets and another collection of Software, then I might want to display two such Persons in a list, and show their collections in a TabNavigator with 2 tabs.

      The first tab containing a datagrid with the software as dataprovider, and another tab with its datagrid taking the tickets as dataprovider.


      it appears that the second tab, wipes out its collection, and resets it to null !



      The problem lies with selecting the second tab. The second tab actually clears the list of tickets belonging to the selected person.


      So, for example.

      1) Start the app.

      2) Select craig

      3) Select "tickets tab" -> no tickets for craig. (when in fact there are).


      If you select the Bob, you will see his tickets.



      1) Restart the app again

      2) Select bob

      3) Select "tickets tab" -> no tickets for Bob, (when in fact there are).


      If you now select Craig, you will see his tickets.


      This seems to be due to the very first time the tab is initialised, and flex goes in 3 times and during one of those calls, clears out the collection and everything else, and assigns it to null.




      If I have  a bug in my code, please let me know asap.


      Thanks in advance





        • 1. Re: TabNavigator bug
          Shongrunden Adobe Employee

          I was able to reproduce this in a beta2 build, but I can't reproduce it with a recent build (  Could you try upgrading to a recent build and seeing if it works for you?

          • 2. Re: TabNavigator bug
            WG Edwards Level 1

            This is the solution. I effectively had to change the flex components








            as declared at the top of the files. As well as upgrade to this newer build version.


            So, in short, avoid the halo components when there is a newer alternative.


            Thanks !