Using GWT 2.1.0 M3 with the following code snippet:

    @UiField ListBox myListBox;

    . . .

    Window.alert( "here" );
    ChangeEvent.fireNativeEvent( Document.get().createChangeEvent(),
myListBox );
    Window.alert( "there" );

I get "here" but not "there".  Further, the event handler is also
subsequently called...

    @UiHandler( "myListBox" )
    void handleSelection( ChangeEvent changeEvent )
    {
        Window.alert( "everywhere" );
    }

and I get "everywhere".  This is strange as it seems as if the event
is fired and calls other code, but does not return to continue
execution (as "there" is not pumped out).

If I alter the event call to be

    ChangeEvent.fireNativeEvent( Document.get().createChangeEvent(),
this );

where 'this' is an object which extends Composite, I get "here" AND
"there" but not "everywhere".  That is the event handling code is not
triggered.

So what is the correct way to trigger an event such as a list box's
value being changed?


Thanks in advance,

Bernmeister.

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