[pyxpcom] how to get a nsIWeakReference in pyxpcom?
by Tomeu Vizoso other posts by this author
Jun 21 2007 11:04AM messages near this date
view in the new Beta List Site
Re: [pyxpcom] queryInterface, browser, python and xul
|
Re: [pyxpcom] how to get a nsIWeakReference in pyxpcom?
Hi all,
I need to pass a reference to a nsIWeakReference to
nsIWebBrowser.addWebBrowserListener(nsIWeakReference listener, nsIIDRef
IID).
The only way I've found to do it is this:
listener = xpcom.server.WrapObject(chrome, interfaces.nsIWebProgressListener)
weak_ref2 = xpcom.client.WeakReference(listener)
self.browser.addWebBrowserListener(weak_ref2._comobj_,
interfaces.nsIWebProgressListener)
I guess weak_ref2._comobj_ is not the best way to get a nsIWeakReference.
Any suggestion?
Thanks,
Tomeu
_______________________________________________
pyxpcom mailing list
pyxpcom@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Tomeu Vizoso
Shane Caraveo
Tomeu Vizoso
Shane Caraveo
Tomeu Vizoso
Mark Hammond
|