Hi Cédric, I am not sure I understood your question, but in the first example case 0 and case 1 will be part of the same code fragment (will not be split), whereas in the second example case 0 and case 1 code may be split.
Roberto Lublinerman | Software Engineer | [email protected] | 408-500-9148 On Sun, Jan 27, 2013 at 4:25 PM, Cédric Barbet <[email protected]>wrote: > Hello, > > The two code structure ensure that the javascript generated by GWT will be > properly splitted ? > > GWT.runAsync(new RunAsyncCallback() { > @Override > public void onFailure(Throwable reason) { > ... > } > @Override > public void onSuccess() { > switch(value){ > case 0: ... ;break; > case 1: ... ;break; > } > > or > > switch(value){ > > case 1: > GWT.runAsync(new RunAsyncCallback() { > @Override > public void onFailure(Throwable reason) { > ... > } > @Override > public void onSuccess() { > ... > } > break; > case 2: > GWT.runAsync(new RunAsyncCallback() { > @Override > public void onFailure(Throwable reason) { > ... > } > @Override > public void onSuccess() { > ... > } > break; > ... > } > > -- > -- > http://groups.google.com/group/Google-Web-Toolkit-Contributors > --- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit Contributors" group. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group. To unsubscribe from this group, send email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
