Yes, swap them.
emailAddressBox is initialized after the call to initWidget(...).

On 30 Dic, 16:13, "a...@mechnicality.com" <a...@mechnicality.com>
wrote:
> Er.. why not swap the order of the two statements? Generally speaking the 
> initWidget statement
> should come first, but there are other options. It is possible to create 
> widgets and contribute them
> to the ui - see @UiConstructor and @UiFactory and:
>
> http://code.google.com/webtoolkit/doc/latest/DevGuideUiBinder.html#Us...
>
> Regards
>
> Alan
>
> On 12/30/2010 6:57 AM, jones34 wrote:
>
> > I would like to do something programmatically with the widgets defined
> > in a UIBinder.xml file.
>
> > I have a corresponding java view class that implements a default
> > constructor that calls initWidget() as its last statement to create
> > the view (and I'm assuming that this is when the widgets in the view
> > get created.  The code below fails because emailAddressBox is null
> > when it's passed to the constructor:
>
> > ....
> >     �...@uifield
> >      FormTextBox emailAddressBox;
> > ....
> > public MyViewImpl(){
> >          new Validator(emailAddressBox);
> >          initWidget(ourUiBinder.createAndBindUi(this));
> > }
>
> > My question is, how can i get access to that widget just after it's
> > created so I can do something with it?
>
> > thanks much
>
>

-- 
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.

Reply via email to