https://code.google.com/p/google-web-toolkit/issues/detail?id=380

The above bug has been fixed in GWT 2.6 and your code has only worked 
because of that bug.

What you are doing doesn't work in pure Java. The reason is that field 
initializers are executed after the super() call returns but before the 
rest of your constructor is executed. So your code basically does

1.) call super
2.) call createHeader and assign a value to someButton
3.) when super() is done, initialize someButton to null (this will override 
the value assigned in 2.)
4.) call someButton.setVisible() inside constructor

You can avoid step 3.) by not initializing the field to null. It will then 
contain the value assigned through createHeader().


-- J.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to