TabNavigator Not Displaying Tabs

Ask a Question related to Macromedia Flex General Discussion, Design and Development.

  1. #1

    Default TabNavigator Not Displaying Tabs

    I have an app whose top-level container is a TabNavigator (PARENT). PARENT has
    one static tab (index 0) and a Repeater bound to an Array that dynamically
    creates the remaining tabs. Clicking a button on the first tab adds an item to
    the Array and updates the Repeater. What should happen is this:

    A new tab is added whose content is another TabNavigator (CHILD) with four
    tabs. The selectedIndex of PARENT is updated to the newly-added tab and
    CHILD's selectedIndex is updated based on the data contained therein.

    What actually happens is this:

    A new tab is added whose content appears to be a Box with a border, but no
    tabs. Only the content of CHILD's first tab is displayed.

    At one point this was working but now it's messed up. I've checked all of my
    code for consistent line endings, etc. The app runs perfectly except for this
    display issue.

    <mx:Script>
    public function onResult( event ):Void
    {
    var deal:DealVO = DealVO( event.result );

    if ( deal != undefined )
    {
    openDeals.push( deal );
    tabRepeater.count += 1;
    AppTabs.selectedIndex = openDeals.length;
    }
    }
    </mx:Script>
    <mx:TabNavigator id="AppTabs">
    <mx:HBox id="firstTab" />
    <!-- DealView editing tabs -->
    <mx:Repeater id="tabRepeater" dataProvider="{openDeals}"
    recycleChildren="false">
    <view:DealView
    dealData="{tabRepeater.currentItem}"
    height="100%"
    label="{getDealDisplayName( tabRepeater.currentItem )}"
    width="100%" />
    </mx:Repeater>
    </mx:TabNavigator>

    jonwillis Guest

  2. Similar Questions and Discussions

    1. TabNavigator tabs not initializing
      I am using a tabnavigator, but when I use the application, if I access components on tabs that the user has not yet selected, I get errors as if...
    2. tabnavigator
      Is it possible to have 2 rolls of tabs in the tabnavigator?
    3. Accessing components in TabNavigator on unselected tabs
      Hi there, I want to set the value of components (says a rich text editor, or image source attribute value, etc.) in tabs that are NOT selected....
    4. tab-colors@TabNavigator
      hi, how do i set (meaning which properties) do i need to fill when i want to have the selected tabs and unselected tabs on a TabNavigator to...
    5. TabNavigator : "hiding" tabs
      I have a tabnavigator in an app and I was wondering how I can hide tabs depending on user level. I have tired destroyObject() but that leaves a...
  3. #2

    Default Re: TabNavigator Not Displaying Tabs

    One this I see is that you shuld have:
    AppTabs.selectedIndex = openDeals.length - 1;
    since selectedIndex is zero based.

    I always suspect instantiation issues with navigator controls. For testing,
    put creationPolicy="all" in AppTabs, and see if that changes anything.

    Tracy

    ntsiii Guest

  4. #3

    Default Re: TabNavigator Not Displaying Tabs

    <blockquote>quote:<br><hr><i>Originally posted by: <b><b>ntsiii</b></b></i>
    One this I see is that you shuld have:
    AppTabs.selectedIndex = openDeals.length - 1;
    since selectedIndex is zero based.

    Tracy<hr></blockquote>
    The reason I'm using openDeals.length is because the static tab takes up index
    0 so I need to start at 1 for my new tabs. That was purposeful. I'll try the
    creationPolicy and see what happens.

    jonwillis Guest

  5. #4

    Cool Re: TabNavigator Not Displaying Tabs

    Quote Originally Posted by ntsiii View Post
    One this I see is that you shuld have:
    AppTabs.selectedIndex = openDeals.length - 1;
    since selectedIndex is zero based.

    I always suspect instantiation issues with navigator controls. For testing,
    put creationPolicy="all" in AppTabs, and see if that changes anything.

    Tracy
    This (creationPolicy="all") works. All the TabNavigator tabs are instantiated and componets properties can be set within actionscript. The creation complete and show event alternatives works too
    Unregistered Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139