Extending a Widget subclass or Composite?

2010-06-08 Thread David Grant
Is it generally bad practice to extend a widget rather than extending from
Composite?

Dave

-- 
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Extending a Widget subclass or Composite?

2010-06-08 Thread Ian Bambury
No.

Ask yourself if you want to expose all the top-level widget's methods. If
you don't, then use a composite. For example, if you are making a labelled
textbox by adding a label and a text box to a VerticalPanel, do you really
want the user able to add more things to the VP, to be able to clear the
widgets out of it etc? If you are making a NumbersOnlyTextBox out of a
textbox, you probably *do* want to expose all the normal methods.

Ian

On 8 June 2010 21:46, David Grant davidgr...@gmail.com wrote:

 Is it generally bad practice to extend a widget rather than extending from
 Composite?

 Dave

 --
 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-tool...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.