subscribe to the TabNavigators "click" event. From here, execute a validation routine based on the last known tab clicked (ie default is tab0, then if user clicks tab1, then update a var to indicate such).
Validate that tab, if it fails, then simply fire an exception routine (ie popup) and selectedIndex = failedTab. The end-user may experience a "flicker" between the two tabs based on how long it takes to compute the validation routine. this is the "quick and easy" way. If you want to prevent a user from accessing the tab, then you may have to extend the TabNavigator and over-ride the various methods associated to that class. I can't remember off the top of my head what the TabNavigator uses in terms of click, but i'd bet the farm it uses SimpleButton. I'd love to post the code for code, line by line here but i'm a bit swamped at present but the above is based on theory (especially if it works similiar to the Accordion) On 6/21/05, Mika Kiljunen <[EMAIL PROTECTED]> wrote: > > > > Hi, > > I could use some help with tabnavigator. I have a TabNavigator that has 3 > tabs on it. When the user clicks tab one and edits some data on the tab view > AND then clicks tab two, I should be able to stop this and go back to tab > one and force the user to save data or at least to warn to save the edited > data before going to tab two. Is there a way to do this? So basically I need > a way to catch the user's click on tab two (haven't figured out where) and > then "cancel" the tab change event… > > > > -Mika > ________________________________ > 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 the Yahoo! Terms of Service. -- Regards, Scott Barnes http://www.mossyblog.com http://www.flexcoder.com ("Waiting for FLEX NCL to arrive") 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/

