Reputation:
i need to fire a function right after module is being loaded , as in right after onModuleLoad() execute what should i use to implement this thing , Timer or scheduleDeferred or anything else ?
something likeScheduler.get().scheduleDeferred(new ScheduledCommand() { @Override public void execute() { Window.alert("bon jour! amis."); } });
or ... ...timer.schedule(2000);
or ??
Upvotes: 2
Views: 2714
Reputation: 2115
Use Scheduler.scheduleEntry in your EntryPoint implementation. I do this now to inject additional (non-GWT handled) stylesheets, and I need to ensure this happens after the view renders.
Upvotes: 2