I develop an application which displays statistics according to various views. When I pass from the basic view to a more advanced view called "VueClient", I re-initialized the dataProvider of my charts. In spite of that, when the charts appear, the dataProvider have one element. Here an sample of my code:

private function stateChangeHandler(event:StateChangeEvent):void {                
                appear.play([chartsPanel]);  //appear:Blur
                if (event.newState == "") {
                                                                                                                   
                }
                else if ( event.newState == "VueClient" )  {
                    chartsPanel.reset();       
                    trace([ "after reset ", chartsPanel.globalDataDisplayed.length]);                                                      
                }
}

private function effectEndHandler(event:EffectEvent):void {//called when appear ends
    if ( event.effectInstance.effect == appear)
       if ( currentState  ==  "VueClient" )
            trace(["after appear ", charts.Panel.length]);
}

chartsPanel.reset() basically do :
globalDataDisplayed = new ArrayCollection();

And the console output is :
after reset ,0
after appear ,1

:-?  Strange...

Any idea of what could cause this ?
__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to