On Sep 8, 11:25 am, John V Denley <[email protected]> wrote: > eclipse seems to prompt me to enter something like: > > listBox.fireEvent(GwtEvent<?> event); > > but I have no idea what that means, and it doesnt like the ? > > is there any documentation on this anywhere, or am I just meant to > instinctively know what this means and how to use it? > > PLEASE help me, ive just spend the last 3 hours trying to find an > example i can learn from, but have found it impossible! > > Thanks, > John
Yes, of course there is, right in the Javadoc (http://google-web- toolkit.googlecode.com/svn/javadoc/1.6/index.html) Look at the ChangeEvent constructor (for example), it says : "Protected constructor, use DomEvent.fireNativeEvent (com.google.gwt.dom.client.NativeEvent, com.google.gwt.event.shared.HasHandlers) to fire change events." So, do that : DomEvent.fireNativeEvent(ChangeEvent.getType(), listbox); and the listbox's fireEvent() will be called properly. When the event to fire is not a DOM event, the xxxEvent class usually implements a static public method "fire", that you can invoke like xxxEvent.fire(source[, ...]); Hope this clears up a bit. I was into that reading too actually last night. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
