This content has been marked as final. Show 3 replies
"show" is the first thing I tried, but it will only fire if the canvas is shown after coming from another sibling (ie another tab or link in the same navigation control).
I created a small test file here:
that uses a linkbar inside a tabnavigator. In my regular application, the linkbar is actually another tabnavigator, but this demonstrates why I don't want to attach any events to the navigation control.
You will note that the first link under each main tab has a show event defined. This will only fire if you click another sibling, then come back to it.
I need an event to fire ANY time the canvas (ie the content of each subtab) comes into view, for whatever reason. This event will trigger code to fetch and refresh data on the page.
You would intuitively think that "show" would do just this, but it doesn't (unless I am doing something wrong). It should fire, for example, when the user clicks the main tab, and the first tab is selected by default. It should also fire if I click the same link it is currently on (but I think this has to do with the fact that Flex disables the current link for some reason, instead of showing it as a 'selected' color).
private function onTabChanged(event:IndexChangedEvent):void
// Do someting for the first tab
// Do someting for the second tab
// Do someting for the third tab
// And so on and so forth...