Regarding the source of HandlerManager, if i have a custom event and
handler (CellClickEvent and CellClickHandler with
onCustomCellClicked() let's say...) when i instantiate HandlerManager
handlerList = new HandlerManager(flexTable) , fire the event with
handlerList.fire(new CellClickEvent(...)) , if i try to get the source
with evt.getSource() in the onCustomCellClick(CellClickEvent evt) i
get source = null. Why is that ? Shouldn't the source be the
"flexTable" object (above)?


On Jan 29, 8:43 pm, Alexander <[email protected]> wrote:
> It is normal behaviour
>
> On 29 January 2010 19:46, Bolletta Mathieu <[email protected]>wrote:
>
>
>
> > Hi there,
>
> > Can someone tell me *Why* when an event is fired, the source is
> > changed?
> >  public void fireEvent(GwtEvent<?> event) {
> >    // If it not live we should revive it.
> >    if (!event.isLive()) {
> >      event.revive();
> >    }
> >    Object oldSource = event.getSource();
> >    // why....?
> >    event.setSource(source);
> >    try {
> >      firingDepth++;
>
> >      registry.fireEvent(event, isReverseOrder);
>
> >    } finally {
> >      firingDepth--;
> >      if (firingDepth == 0) {
> >        handleQueuedAddsAndRemoves();
> >      }
> >    }
> >    if (oldSource == null) {
> >      // This was my event, so I should kill it now that I'm done.
> >      event.kill();
> >    } else {
> >      // Restoring the source for the next handler to use.
> >      event.setSource(oldSource);
> >    }
> >  }
>
> > thanks
>
> > --
> > 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]<google-web-toolkit%[email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> Regards,
> Alexander

-- 
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.

Reply via email to