@Thomas haha... wow... now looking at it in the morning i see what you're pointing out. I didn't even realize it was KeyPressEvent :)
On Thu, Jun 3, 2010 at 09:39, Thomas Broyer <t.bro...@gmail.com> wrote: > > > On 31 mai, 20:54, justint <too_jus...@hotmail.com> wrote: > > Hi, I'm fairly new to GWT and I'm trying to add events to my > > "eventBus"... > > > > final HandlerManager eventBus = new HandlerManager(null); > > .. > > > > eventBus.addHandler(RequestEvent.TYPE, new > RequestEvent.Handler() { > > public void onRequestEvent(RequestEvent > requestEvent) { > > if (requestEvent.getState() == > State.SENT) { > > System.out.println("RPC sent!"); > > } > > } > > }); > > > > This RequestEvent event works fine, but this doesn't work for > > instance...or at least I don't think it works: > > eventBus.addHandler(KeyPressEvent.getType(), new > KeyPressHandler() > > { > > public void onKeyPress(KeyPressEvent arg0) { > > System.out.println("Key pressed event!"); > > } > > }); > > > > Any tips are greatly appreciated! > > Are you *really* firing KeyPressEvents on your event bus ?! > > @Tristan: getAssociatedType and getType return the same object, > getAssociatedType is not static though, it's part of the GwtEvent > interface (and used by the HandlerManager to find back corresponding > handlers in its internal registry). > > -- > 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<google-web-toolkit%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > -- 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.