logo       

RE: Missing some properties and methods (Interfaces): msg#00008

mozilla.devel.xpcom.python

Subject: RE: Missing some properties and methods (Interfaces)

> I continued to build an application with XULrunner and
> python, but its a
> bumpy ride.
> Some XUL elements are missing special properties and methods.

Yeah, I mentioned that in a previous mail. The "dom" work I have been doing
(which BTW just landed on the trunk!) faces the same issue. There will be
other problems you will have too - eg, the "window" object doesn't have a
functioning 'open' or timeout methods.

My DOM work has workarounds in a new 'nsdom' package - but I am yet to
consider how they apply to the rest of pyxpcom - I didn't want to make
pyxpcom itself depend on nsdom - certainly not without more thought. Much
of my effort recently has been on not breaking things :)

Also, in this "new world order", it is likely your code would change
significantly - your .py code would be directly in the XUL and would work as
expected (within the hacks I have implemented; see below). A stand-alone
component passed a DOM object as a param is still a valid use-case though,
but one I'm yet to consider.

> Interfaces:
> Yea, queryInterface helps for some but look up the XUL reference:
> Some properties and methods are not defined in the interface for the
> element. And that are the p&ms missing in pyxpcom.

My list is at
http://lxr.mozilla.org/seamonkey/source/extensions/python/dom/nsdom/context.
py#39. It looks like I need to add at least the "select control" (whatever
that is :) and the deck

> How does JS address functions that are not part of an interface?
> How are these functions implemented?

There is some JS specific code in nsCOMClassInfo.cpp that is tricky to make
truly language agnostic. I don't think that work is actually scheduled
though.

Mark.



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise