if the button is the only thing that handles clicks in the popup, why not add the clickHandler directly to the button?
Button closeButton = new Button("Close"); closeButton.addClickHandler(new ClickHandler(){ public void onClick(ClickEvent event) { hide(); } }); On Mar 16, 10:32 pm, "tyler.nc" <carolinaboar...@gmail.com> wrote: > Hello all, > > I am developing an Appengine application now that requires AuthSub > authentication to access users Spreadsheets with GData. What I have > now is a widget that extends PopupPanel that pops up as soon as you > visit the page telling you what it is about and giving information > such as the terms of service. I want my widget (that extends > PopupPanel) to close when the user clicks a button but for some reason > the ClickHandler is not working at all. Are there any better ways to > do this? This is quite urgent as I have a deadline to meet and wasn't > expecting this little problem. > EX: > <code> > public class PopupWidget extends PopupPanel implements ClickHandler { > ... > ... > ... > public void onClick(ClickEvent event) { > Object sender = event.getSource(); > if( sender == btnAgree ) > hide(); > }} > > </code> > > I'm completely stumped. It seems as though a PopupPanel cannot > implement a ClickHandler..please tell me if this is the case. > > Thanks! -- 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.