This content has been marked as final. Show 4 replies
Have a close look at the code execution. You create a new instance of Calendar which runs setYears... before you add the event listener. So, create the new Calendar instance but don't call setYears. Make setYears a public function and call setYears from the instance in CalendarMgr.
LuigiL thanks for your response.
I'm trying to understand it better. First the goal is to make sure all the years get populated. That's why setYears() method does the dispatchEvent. Are you saying that the function is already executed before set years happens? I've also tried this below.
Basically the years array was a VERY fast creation process. There's very little down time when it load (if any). I did try doing the Array as a DataProvider and was able to see it complete. The issues still could not be resolved from trying to Dispatch the Event after it fully loaded. LuigiL was dead on.