Ask a Question related to Macromedia Flex General Discussion, Design and Development.
-
jonwillis #1
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
-
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... -
tabnavigator
Is it possible to have 2 rolls of tabs in the tabnavigator? -
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.... -
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... -
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... -
ntsiii #2
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
-
jonwillis #3
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
-



Reply With Quote


