2 Replies Latest reply on Aug 30, 2010 10:40 AM by Flex harUI

    Components inside TabNavigator subcomponents  must use unique IDs for their own subcomponents, why?

    Malena Mesarina

      Hi,

       

      I wonder if someone knows why this is happening. I just wasted hours in trying to figure out why two components that are inside a <TabNavigator>  component get mixed up by Flex when the Application starts.

      These two components have identical code , but the selectedIndex propert of the TabNavigator is set to 1 so the first component should be created first. Well Flex doesn't do that. Because the two components used identical "id" labels for their subcomponents, Flex doesn't like this and gets totally mixed up and instead of calling the Initialization() function of my first components it calls the Initialization function of the second component.

       

      So I changed all the "id" names in the second component, and I still had a problem.

      I have a viewtack also inside these two identical components, and I had to re-label the Navigator Content inside the ViewStack because otherwise Fle would still go ahed and try to initialize the second component.

       

      This is totally weird.

       

      Why can't I not re-use the same id's for components inside the TabNavigator components.

      The id's should not be considered global, which i suspect is happening.

       

      Anyone had troubles like this?

       

      -Malena