Thanks for the replies everyone. My app/TN actually has 8 states/tabs,
but I still ended up going with the simple approach. In case anyone is
interested, the code is below. Further thoughts still welcome.

<mx:TabNavigator id="tn" change="updateActiveTabIndex()"
selectedIndex="{ModelLocator.getInstance().activeTabIndex}">
     <view:SearchTab label="Search" id="searchTab" width="100%"
height="100%" />
     <view:DocumentTab label="Document" id="documentTab" width="100%"
height="100%" />
     <!-- More tabs here -->
</mx:TabNavigator>

And the function that keeps my model updated when the tabs are
directly clicked:

private function updateActiveTabIndex():void
{
     ModelLocator.getInstance().activeTabIndex = tn.selectedIndex;
}

And the types of commands I make from other parts of the app:

ModelLocator.getInstance().activeTabIndex = ModelLocator.DOCUMENT_TAB;

Cheers,
Ben





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Great things are happening at Yahoo! Groups.  See the new email design.
http://us.click.yahoo.com/TISQkA/hOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to