ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> pyxpcom
pyxpcom
[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

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved