Thx Thomas I really appreciate this.

That worked, but when I handle the event in DoSomething, I need to
know what button was clicked.

e.g.

public class DoSomething extends Composite implements ClickHandler{

                private SimpleWidget simpleWidget;

                public DoSomething() {
                        FlowPanel fp = new FlowPanel();
                        simple = new SimpleWidget();

                        simple.addClickHandler(this);

                        fp.add(simpleWidget);
                        initWidget(fp);
        }

        public void onClick(ClickEvent event) {
                if (event.getSource() == simple.getButton()) {

                        //do something
                }else if(event.getSource() == smiple.getSomeOtherButton(){
                      //do something else.
                }
        }
}


So in the onClick handler event.getSource() sources SimpleWidget, but
I really need to know what button was clicked.
--~--~---------~--~----~------------~-------~--~----~
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-Toolkit@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