Thanks On Jan 13, 1:46 am, Fazeel Kazi <[email protected]> wrote: > calling sinkevent() means telling gwt that you would like to watch > that event. So whenever the event occurs, control will be passed on to > onBrowserEvent(). > > It's like sinkevent() is meant to register for events that you care. > And when that happens, you can cathc that event in onBrowserEvent() > > Read more here:http://markmail.org/message/5t3swkltgadexbwj > > On 1/13/10, myapplicationquestions <[email protected]> wrote: > > > > > HI All, > > > I have a tempwidget which extends gwt widget class. I have some > > buttons on them "button1","button2". There are 3 ways to listen to > > actions done on the button > > > 1) add clickhandlers for each button > > > 2) capture it on onbrowserevent > > > 3) capture it in NativePreviewHandler implementation somewhere. > > > I am able to get it to work with option 1 and 3 but for option 2 > > nothing seems to come in onbrowseevent > > > public void onBrowserEvent(Event foEvent) > > { > > int liEventType = DOM.eventGetType(foEvent); > > > Element loElement = Element.as(foEvent.getEventTarget()); > > switch(liEventType) > > { > > case Event.ONCLICK : > > { > > ... > > > unless i do a sinkEvents > > > this.sinkEvents(Event.ONCLICK); > > > i am struggling to understand why we always need to do a sinkEvent in > > order to capture the event in onbrowserevent? > > > Thanks- Hide quoted text - > > - Show quoted text -
-- 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.
