If you have one class that implements multiple webclient listener interfaces, you won't be able to add listeners.
Created attachment 12624 [details] [diff] [review] Context diffs of fix for this bug. Please review.
Files in this fix: M classes_spec/org/mozilla/webclient/wrapper_native/EventRegistrationImpl.java M classes_spec/org/mozilla/webclient/wrapper_native/NativeEventThread.java A classes_spec/org/mozilla/webclient/wrapper_native/WCEventListenerWrapper.java M src_moz/NativeEventThread.cpp M src_moz/motif/NativeLoaderStub.cpp Added class WCEventListenerWrapper: * This class allows the custom app to have one instance that implements * multiple Webclient event listener types. <P> * This is simply a "struct" type class that encapsulates a listener * instance with its class name. This is necessary because the class * name is lost when we deal with the listener as a * WebclientEventListener, and not a WebclientEventListener subclass. <P> * @see org.mozilla.webclient.wrapper_native.NativeEventThread#addListener Made it so when a java listener is added, * We create a WCEventListenerWrapper containing the user passed * DocumentLoadListener, and the string obtained from * DocumentLoadListener.class.getName(); We then call nativeEventThread.addListener: * Takes the abstract WebclientEventListener instance and adds it to a * Vector of listeners to be added. This vector is scanned each time * around the event loop in run(). <P> * The vector is a vector of WCEventListenerWrapper instances. In run() * these are unpacked and sent to nativeAddListener like this: * nativeAddListener(nativeWebShell,tempListener.listener, * tempListener.listenerClassName); <P>