This content has been marked as final. Show 4 replies
Have the TimestampManager.mxml set the timestamp in the footer in the resultHandler for the result event.
It does not work well because the empty timestamp string has been displayed before TimestampManager gets the
string of timestamp from the php server. On other hand, I do not want TimestampManager to know what other components are using it. To let TimestampManager set the timestamp label in Footer, TimestampManager has to keep a reference of Footer.
Can I make my application to reload some data components before loading UI components? In this way TimestampManager do not need to know what components are using it.
Can preloader be used here?
Events are asynchronous in Flex, so you can't count on the data being loaded. You could use an MVC architecture for a bit less tightly coupled app.
I don't think preloader should be used here. If some data needs to be loaded before UI components are displayed the data loader can fire and event when data load is finished. The footer or the component responsible for painting the footer can listen to this event and paint the UI. You can extend this to the entire screen and paint the screen after the data is loaded. Downside is user does not see anything till the server call is done.