What qualifies as a 'view' in flex. Are 'views' containers like panels? Or are they flex components? Examples would be great. Thanks.
A:
Views are just child containers of a parent container which the parent shows one at a time. As in the ViewStack control (to quote Adobe's docs):
"A ViewStack navigator container consists of a collection of child containers stacked on top of each other, where only one child at a time is visible. When a different child container is selected, it seems to replace the old one because it appears in the same location. However, the old child container still exists; it is just invisible."
You navigate the stack of views by changing the selectedIndex property of the ViewStack. There are other kinds of controls that handle views, but this will get you started.
Robusto
2010-09-03 19:21:16
So, essentially any container within the <mx:Application> tag is a view? Also, does that mean views within views are possible? Say, I have the following <mx:Application> <mx:Panel> <mx:Panel /> </mx:Panel> </mx:Application> tags; are both panels view?
tommac
2010-09-03 19:37:48
No. Only certain containers like ViewStack, Accordion, etc. function like that. Think of it like this: you have a deck of cards, and the bottom card, which you can see, is the king of clubs. The other 51 cards are not visible, but you could replace the king of clubs with any other card, and then that card and only that card would be visible. The king of clubs would now be hidden.
Robusto
2010-09-03 19:53:23