Thanks. I should have read the webpage on doing the conversion before posting.
Well that was really painful to go through and change the event handlers to the new way. Wow there's a lot of @Deprecated stuff now. It's nice that the javadocs include some info on the new way. Cool though to finally delete all the stub methods from the Listeners interfaces that weren't in use (onKeyDown, etc). On Feb 24, 2:40 pm, Isaac Truett <[email protected]> wrote: > // From memory, without running it past a compiler, I think it is: > Widget widget = (Widget) event.getSource(); > > On Tue, Feb 24, 2009 at 2:37 PM, Brian <[email protected]> wrote: > > > Migrated my app to 1.6, and am really liking the war structure and the > > speed increase in booting. By migrating to the new war structure, I > > just got rid of my local jetty server. > > > Anyway, I'm plowing through 200 warnings or so on deprecated usage, > > and am just punting on one type. Basically I'm hoping someone tells > > me what to do by the time I clear up everything else... > > > It's the conversion from ClickHandler to ClickEvent. How do I convert > > the click handler on a button from a ClickListener to a ClickHandler, > > and still compare on the widget? > > > convert: > > public void onClick(Widget widget) { > > if (widget == someWidget) { > > // do something... > > } > > } > > > to: > > public void onClick(ClickEvent event) { > > // tell me what to write here, please :-) > > } --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
