Re: Activities Places: How to listen to PlaceChangeEvents without an Activity?
Hi, PlaceChangeEvents are fired on the EventBus that you passed into your PlaceController. So you can listen to them via: eventBus.addHandler(PlaceChangeEvent.TYPE, new PlaceChangeEvent.Handler() { //implement method }) -- J. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/62gUX59RGx0J. 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.
Re: Activities Places: How to listen to PlaceChangeEvents without an Activity?
Thank you. Works pretty well :) Is that GWT's new EventHandler structure? I mean: XyzEvent.Handler? No more seperate Handler class? And XyzEvent.TYPE instead of getType()? I like both changes pretty much :) On 11 Okt., 22:39, Jens jens.nehlme...@gmail.com wrote: Hi, PlaceChangeEvents are fired on the EventBus that you passed into your PlaceController. So you can listen to them via: eventBus.addHandler(PlaceChangeEvent.TYPE, new PlaceChangeEvent.Handler() { //implement method }) -- J. -- 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.
Re: Activities Places: How to listen to PlaceChangeEvents without an Activity?
I don't think this is really new You can also define a CustomClass implements PlaceChangeEvent.Handler {} then addHandler(PCE.TYPE, new CustomClass()); As for the .TYPE vs getType(), I do not know the details but if you look at PlaceChangeEvent extends GwtEvent it has the static field TYPE but a dom event like ClickEvent still has getType() -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/YVaVO4kj6lcJ. 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.
Re: Activities Places: How to listen to PlaceChangeEvents without an Activity?
DomEvent-s have their types lazily created, because they're registered in a global, er, registry, to easily match event types (from the browser, evt.type, i.e. a string such as click, mouseover, etc.) to DomEvent.Type instances. Most other events don't need this, but some of them could benefit from it: some events have a static fire() helper method; when invoked, if the TYPE private field hasn't been initialized, it means getType() hasn't been called, i.e. no handler has been registered for the event, so the fire() help method can exit early, without event creating an event instance and calling the event bus. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/yiNrbRh9FwIJ. 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.
Re: Activities Places: How to listen to PlaceChangeEvents without an Activity?
Ah, that is helpful. Thanks, Thomas! -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/7p2GtlKgCbEJ. 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.