RE: [SPAM] Re: [SPAM] Re: [SPAM] [flexcoders] TabNavigator switches to second tab when revealed after a currentState change
Sure. States can be very useful, but I reserve them for more minor changes the content of a component. They are very powerful, but messy to code and understand, compared to a viewstack. And I do see occasional reports of strange behaviors interactions with them. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Penny Laus Sent: Saturday, January 23, 2010 6:01 PM To: flexcoders@yahoogroups.com Subject: [SPAM] Re: [SPAM] Re: [SPAM] [flexcoders] TabNavigator switches to second tab when revealed after a currentState change On Sun, Jan 24, 2010 at 1:40 AM, Tracy Spratt tr...@nts3rd. mailto:tr...@nts3rd.com com wrote: A ViewStack is simply a way to switch between components. It has no visible presence of its own. The children of a ViewStack can be anything (in some container), including a full TabNavigator. You can nest ViewStacks as desired. Thanks very much for your suggestions - it's working beautifully now. And, as you say, there's no reason not to put a full TabNavigator within the ViewStack. Have a good weekend. -- PL
RE: [SPAM] Re: [SPAM] [flexcoders] TabNavigator switches to second tab when revealed after a currentState change
A ViewStack is simply a way to switch between components. It has no visible presence of its own. The children of a ViewStack can be anything (in some container), including a full TabNavigator. You can nest ViewStacks as desired. A side note on TavNavigator; if you think you will ever want to dynamically control the visible tabs, say based on user identity/permissions, I advise TabBar + ViewStack. To remove hide a tab in a TabNavigator, you have to manipulate the childen directly. If you use a TabBar, you can control its content just by manipulating its dataProvider. A hidden view will still be in the ViewStack, but its tab will not be visible, thus the view will be unavailable. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Penny Laus Sent: Saturday, January 23, 2010 2:06 AM To: flexcoders@yahoogroups.com Subject: [SPAM] Re: [SPAM] [flexcoders] TabNavigator switches to second tab when revealed after a currentState change On Sat, Jan 23, 2010 at 5:28 PM, Tracy Spratt tr...@nts3rd. mailto:tr...@nts3rd.com com wrote: For a change as significant as that, I suggest using ViewStack instead of states. Tracy, Thanks very much for responding - I always read your postings with attention. In my case are you suggesting I put everything into a ViewStack and not use states? So, I'd have something like ViewStack 0 - My landing screen with the login/send password/add registration 1 - 2 -3 My registration details Am I right in thinking that I could use a TabBar to make ViewStack 1, 2 3 look and act like a TabNavigator? Thanks for the help!
Re: [SPAM] Re: [SPAM] [flexcoders] TabNavigator switches to second tab when revealed after a currentState change
On Sun, Jan 24, 2010 at 1:40 AM, Tracy Spratt tr...@nts3rd.com wrote: A ViewStack is simply a way to switch between components. It has no visible presence of its own. The children of a ViewStack can be anything (in some container), including a full TabNavigator. You can nest ViewStacks as desired. Thanks very much for your suggestions - it's working beautifully now. And, as you say, there's no reason not to put a full TabNavigator within the ViewStack. Have a good weekend. -- PL
RE: [SPAM] [flexcoders] TabNavigator switches to second tab when revealed after a currentState change
For a change as significant as that, I suggest using ViewStack instead of states. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Penny Laus Sent: Saturday, January 23, 2010 1:22 AM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] TabNavigator switches to second tab when revealed after a currentState change I've run into a funny problem in a registration application I'm working on. The base state for this application is a TabNavigator with three Canvas subelements. On its own, this works fine. When the application loads, I switch away from the base state to a screen to let the user login/get their password emailed/add a new registration. If they want to add a new registration, currentState is set back to to return to the base state - the full data entry form. The funny part is that when the state changes, the selectedIndex of the TabNavigator switches from 0 to 1. I've stepped through in the debugger and before this line the (hidden) TabNavigator has an index of 0. this.currentState = ; // Base state has input form After this line, the TabNavigator has an index of 1. If I explicitly reset the selectedIndex back to 0, the TabNavigator is drawn with elements from the first two pages drawn on top of each other. I can see that the Canvas for index 0 is drawn and the Canvas for index 1 is drawn on top of that. I've tried using a ViewStack instead of TabNavigator but, as you would expect, it makes no difference. I've been going around in circles for some time here without any progress - is this problem ringing a bell? I didn't find anything like it in the archives. I've tried with the 3.2 and 3.5 SDKs but the behavior is the same in both cases. I could skip the TabNavigator completely and do everything with ViewStates but, honestly, I'd rather not. I find it simpler to work with the TabNavigator in the visual designer. Then again, if it isn't going to work right it's not really eaiser any more. Thanks in advance for any help or suggestions.
Re: [SPAM] [flexcoders] TabNavigator switches to second tab when revealed after a currentState change
On Sat, Jan 23, 2010 at 5:28 PM, Tracy Spratt tr...@nts3rd.com wrote: For a change as significant as that, I suggest using ViewStack instead of states. Tracy, Thanks very much for responding - I always read your postings with attention. In my case are you suggesting I put everything into a ViewStack and not use states? So, I'd have something like ViewStack 0 - My landing screen with the login/send password/add registration 1 - 2 -3 My registration details Am I right in thinking that I could use a TabBar to make ViewStack 1, 2 3 look and act like a TabNavigator? Thanks for the help!