At the moment i read your last post/ understood the problem i knew that you 
tried it several times - i saw all your vehement efforts to get it into my 
brain (but some times brains don't want to see :-) ).

i just refactored my code - in fact i haven't changed much (i already had 
some scheduler stuff in my code). Because all my tasks are done on 
construction time (gin injected stuff, ApplicationManager registers himself 
to onTaskDoneEvents in constructor)  i got rid of the public start() 
method. Now i only have a private start called in the way you suggested it:
...
    @Override
    public void onTopicTreeLoadedEvent(TopicTreeLoadedEvent event) {
        ttReady = true;
        start();
    }
..
    @Override
    public void onAdminUnitsLoaded(AdminUnitsLoadedEvent event) {
        auReady = true;
        start();
    }
...
private void start() {
        if (ttReady && auReady) {
            Scheduler.get().scheduleFinally(new ScheduledCommand() {

                @Override
                public void execute() {
                    // set up activity managers
                    
sidePanelAreaManager.setDisplay(contentArea.getWestSideArea());
                    
breadCrumbAreaManager.setDisplay(contentArea.getBreadcrumArea());
                    
contentMenuAreaManager.setDisplay(contentArea.getContentMenuArea());
                    
contentAreaManager.setDisplay(contentArea.getContentArea());
                    // insert dynamic layout in static layout
                    staticView.getContentArea().setWidget(contentArea);
                    contentArea.setDefaultLayout();
                    historyHandler.register(placeController, eventBus, 
startPlace);
                    historyHandler.handleCurrentHistory();
                    currentPlace = placeController.getWhere();
                }
            });

        }
    }

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/u1L5T1n491sJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to