I agree that's a bit confusing -- though the sample class in that case
doesn't actually extend Widget.
@rjrjr: Perhaps we should add a clear admonition to that example to make it
clear that you can't attach *widgets* that way?

On Wed, Dec 23, 2009 at 5:58 AM, nicolas.deloof <nicolas.del...@gmail.com>wrote:

> This is just a copy paste from the Hello World in the dev
> documentation :
>
>
> http://code.google.com/intl/fr-FR/webtoolkit/doc/latest/DevGuideUiBinder.html#Hello_World
>
> maybe not the best sample to show best practices...
>
>
> On 23 déc, 11:43, Thomas Broyer <t.bro...@gmail.com> wrote:
> > On Dec 23, 10:04 am, "nicolas.deloof" <nicolas.del...@gmail.com>
> > wrote:
> >
> > > I also made the mistake you describe :
> >
> > > root.getElement().appendChild( widget.getElement() );
> >
> > > Using root.addWidget( widget ) as replacement doesn't fixes the event
> > > handler issue  :'(
> >
> > Because you have the exact same kind of error in your EventWidget
> > (line 67)
> http://code.google.com/p/juggers/source/browse/trunk/src/org/juggers/...
> >
> > Make EventWidget extend Composite and replace line 67 with:
> >    initWidget(binder.createAndBindUi(this));
> >
> > @Joel: maybe a warning on getElement()'s JavaDoc would help?
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to