There is no "correct" way of doing this.  However it would make for
better encapsulation if you instead called the getData method in each
component's show method.  That way the tabnavigator would need to know
less about its children.

--- In [email protected], "iilsley" <[EMAIL PROTECTED]> wrote:
>
> 
> I have a Tabnavigator with 3 customer components ..
> 
> Each component has a 'getData' method which loads the data for that
> component .
> 
> I currently have a change event handler on the tabnavigator
> which does a
> 
>              private function changeView(e:IndexChangedEvent):void
>              {
>                  var o:Object = e.relatedObject;
>                  o.getData();
>              }
> 
> This works but is this the 'correct' way todo it ?
>


Reply via email to