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] queryInterface, browser, python and xul
by Lord Ruslan Nightmare other posts by this author
Jul 1 2007 9:07PM messages near this date
view in the new Beta List Site
Re: [pyxpcom] 'import components' issue with xpcom and python 2.5.1 | Re: [pyxpcom] queryInterface, browser, python and xul
Hello.
Spent last night trying to figure out how to port mybrowser ( 
http://benjamin.smedbergs.us/xulrunner/mybrowser-0.2.2.xulapp ) from 
JavaScript to Python.
It fails at LoadURI() - AttributeError: XPCOM component '<unknown> ' has 
no attribute 'LoadURI'
I tried to get all available interfaces and blindly query browser for them:

    browser = document.getElementById("browser")
    for name, iid in components.interfaces.items():
    try:
            browser.queryInterface(iid)
            dump(str(name)+'\n')
    except:
            donothing()

Here is what i got:

nsISupportsWeakReference
nsIObserver
nsIDOMXULElement
nsIDOM3Node
nsIDOM3EventTarget
nsIDOMEventTarget
nsIAccessibleProvider
nsIDOMNSEventTarget
nsIDOMElementCSSInlineStyle
nsIDOMNode
nsIDOMEventListener
nsIDOMNSElement
nsIClassInfo
nsISupports
nsIDOMElement

Checked all of them, and it seems that none is capable of anything that 
browser is supposed to do (like, loading URI).
So...this is not implemented, or it's just my poor Python/XPCOM skills?
_______________________________________________
pyxpcom mailing list
pyxpcom@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Lord Ruslan Nightmare
Mark Hammond
Shane Caraveo

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