return type of foo() and bar() is int.
So now
public void onClick(Clickevent e) {
GWT.runAsynck(
public void onSuccess() {
int x = foo();
int y = bar(x);
goo(z);
}
);
}
public int foo() {
}
public int bar(int x) {
}
public void goo(int z) {
}
The above code does code splitting properly if foo(), bar() and goo() called from only one place onClick().
So codes for all these methods will be loaded only after click(). am i right ?
Also, i could not understand the below red marked line properly. Request you to explain a bit more.
Thanks
Deepak
On Wed, Feb 23, 2011 at 6:31 AM, Philippe Beaudoin <philippe.beaudoin@gmail.com> wrote:
The way you write it does not worl:int x = foo();expects foo() to return an int, but it's declared as returning void.You do not need to runAsync in foo, bar and goo provided you're only calling them from one place (onClick). If you're always calling them in succession, you should always have only one split point (runAsync) for the entire group.Cheers,Philippe--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment