All set on this - followed example given on event listeners in developer guide.
On Mar 5, 12:11 am, zackmac <[email protected]> wrote: > I'm trying to make a click event occur for several images that are > rendered as HTML using AbstractImagePrototype.getHTML() and having > trouble. I can make a click event just fine when I do each individual > HTML object, but when I try to use the "this" pointer, I get the error > in the subject. Here's a snippet of my code. Please comment how I > can do this right and, if not this way, how to make it such that I > don't need to create a bunch of individual clickListeners. > > // Constructor > TheLocalConnectorContent() { > t = new FlexTable(); > t.addStyleName("flex-table"); > > images = GWT.create(TheLocalConnectorImages.class); > > // Retrieve the html portion from TheLocalConnectorImages > carouselresale = new HTML(images.carouselresale().getHTML()); > > carouselresale.addClickListener(this); > > } > > // Fired off when an ad was clicked > public void onClick(Widget sender) { > > // First check to see if a regular image was clicked > if (sender == carouselresale) { > setImagePopupAndDisplay(carouselresale_full); > } > > } --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
