I'm not sure what you mean by "the framework".  AFAIK, the framework doesn't 
have any code that automatically switches ViewStack views based on mouse 
activity.

But you could put a breakpoint on the ViewStack code and see why it is changing.

-Alex

From: Tom McNeer <tmcn...@gmail.com<mailto:tmcn...@gmail.com>>
Reply-To: "flexcoders@yahoogroups.com<mailto:flexcoders@yahoogroups.com>" 
<flexcoders@yahoogroups.com<mailto:flexcoders@yahoogroups.com>>
Date: Tuesday, October 22, 2013 12:30 PM
To: "flexcoders@yahoogroups.com<mailto:flexcoders@yahoogroups.com>" 
<flexcoders@yahoogroups.com<mailto:flexcoders@yahoogroups.com>>
Subject: Re: [flexcoders] Nested TabNabvigator/Repeater error



Hi Alex,

Thanks very much for the reply.


On Tue, Oct 22, 2013 at 12:56 PM, Alex Harui 
<aha...@adobe.com<mailto:aha...@adobe.com>> wrote:
In the AS version, I would guess there are relatively few ways to "switch to a 
different screen".

Yeah, I would agree. The reason I used the vague "switch to a different screen" 
is that the resulting action is nothing that is called in the component or even 
its parent.

I'll lay this out as quickly as I can:

There's a view we'll call Cases which has a ViewStack that consists of "Case 
Results" and "Case Details." A search triggered from a parent of the Cases view 
results in a grid in Case Results being populated. A click on a row in the grid 
calls the server for data on an individual Case and switches to the Case 
Details view.

That view contains a TabNavigator for various aspects of the Case, including 
Documents. The nested TabNavigators I'm trying to create are within that 
Documents view.

When I say that a click on any second-level (Document subtype) tab goes "to a 
different screen," what happens is that everything is switched back to the Case 
Results view - taking you back to the first element in the Cases ViewStack. 
There's no action or event defined in any of the child views inside the Case 
Details TabNavigator that would switch the view that way.

That's why I find it confounding.

If you put a breakpoint on code that does that, does it get hit and will the 
stack info show you how it got there?

The code would be in the framework. It would just be the handler for a click on 
the TabBar.

The TabBar children should just be Tabs that dispatch events.  The logic that 
responds to the change event should be the main concern.

Thanks. I understand that. But I'm not writing any code to react to the click 
event. It's just the default action from the framework, which should be to make 
the box corresponding to the Tab the selectedChild of the TabNaviagator.

I have tried walking through my ActionScript, and the oddity I see (which I may 
not really understand) is that even after all the custom components are added 
as children to one of the second-level TabNavigators, the TabNavigator and its 
TabBar show in debugging as having a different number of children.



--
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.com
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560


Reply via email to