Re: [pyxpcom] Using (object) on the component's declaration
by Todd Whiteman other posts by this author
Dec 1 2008 10:39AM messages near this date
view in the new Beta List Site
Re: [pyxpcom] Using (object) on the component's declaration
|
[pyxpcom] Mozilla SFTP protocol handler using Python
Philip Semanchuk wrote:
> On Dec 1, 2008, at 8:58 AM, Arthur Gouveia wrote:
>
> > Hi folks!
> >
> > I´m trying to make a PytXPCOM + XUL + Storm(ORM) app.
> >
> > The problem I´m having is that when I declare a component (Python
> > Class)
> > without using (object), the PyXPCOM registers it just fine, but when
> > I use
> > (object), or when I say the class inherits from a class that inhetis
> > object,
> > on my Class declaration, the pyxpcom doesn't register it.
>
> You diagnosed this correctly. PyXPCOM components must be "old-style"
> classes; i.e. they cannot inherit from object. As you said, the
> symptom is that one's class is simply not registered. I remember that
> this took me a long time to debug.
Hi Philip,
Yes, this is logged as the following PyXPCOM bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=345551
There is a patch in this bug report that provides new style class
support for PyXPCOM.
Komodo has been using this patch for a number of years now, and I also
include this patch in the PythonExt (prebuilt PyXPCOM) builds.
Cheers,
Todd
_______________________________________________
pyxpcom mailing list
pyxpcom@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Arthur Gouveia
Philip Semanchuk
Todd Whiteman
|