Andrei F
Andrei F

Reputation: 4394

GWT Code splitting using Async Provider

I'm using runAsync in GWT to split my code for different subsystems of my app, with the Async provider pattern (found in the code splitting documentation). So, every time i need to instantiate any of my classes using runAsync, I create a method for that subsystem - getAsync(..) - with an interface parameter containing onSuccess(Subsystem instance) (called when the code is downloaded). When I need to call a method for that class instance, I first call the getAsync(...) and inside the interface's onSuccess(instance), I call instance.myMethod(). The problem is that the majority of the code is put in the Leftover code, and not in the exclusive split point for that subsystem. What am I missing here ?

Upvotes: 0

Views: 377

Answers (0)

Related Questions