Hello,
I have the following class declaration:
class MyLocationListener: public nsIWebProgressListener
{
public:
MyLocationListener();
virtual ~MyLocationListener();
NS_DECL_ISUPPORTS
NS_DECL_NSIWEBPROGRESSLISTENER
};
and the corresponding implementation. I am using this class in the following
way:
MyLocationListener * listener = new MyLocationListener();
nsCOMPtr<nsIWeakReference> weakref = do_GetWeakReference(listener, &retval);
CHECKERR();
retval = browser->AddWebBrowserListener(weakref,
NS_GET_IID(nsIWebProgressListener));
CHECKERR();
however, the do_GetWeakReference call fails with an NS_ERROR_NO_INTERFACE error
code. Can someone point out to me how to fix that? I tried to add a
nsIWeakReference superclass to the class decl, including the NS_DECL_xx macros,
but that yielded compile errors that I was notable to decipher. Maybe someone
has a quick hint, or link..
TIA,
Christian
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding