Thanks man.
Well I've solved it by creating a interface in the B class and calling
it in the A class.

On Jun 23, 11:36 am, olivier nouguier <[email protected]>
wrote:
> keep cool ;)
>
> You can pass a Runnable (Command) as parameter ... like a clikHandler
>
> On Wed, Jun 23, 2010 at 4:29 PM, Thiago Miranda de Oliveira <
>
>
>
>
>
> [email protected]> wrote:
> > Plz, someone?
>
> > On Jun 23, 10:45 am, Thiago Miranda de Oliveira <[email protected]>
> > wrote:
> > > Hi.
> > > Im building a logic here that a class A instantiate a object of
> > > another class B. B has a specified clickHandler that does a animation.
> > > I want that the class A can pass a method to the class B as a
> > > parameter to do the animation and some extra stuff that I wanna do in
> > > the class A.
> > > So I was thinking in something like that:
>
> > > class A
> > > Button trigger = new Button();
> > > trigger.addClickHandler(new ClickHandler(){
> > >  //doStuff
> > >  callBack();
>
> > > }
>
> > > class B
> > > A a = new A();
> > > a.setCallBack(doThis());
>
> > > public void doThis(){
> > >  Window.alert("test");
>
> > > }
>
> > > How can I do that in GWT?
>
> > > Thanks for the attention
> > > Cheers
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<google-web-toolkit%2Bunsubs 
> > [email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> "Computers are useless. They can only give you answers."
> - Pablo Picasso -

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to