2005/11/19, Joerg Budischewski <[EMAIL PROTECTED]>:
Didn't noticed this issue in QA, but I noticed the bug. My actual python hack to provide methods and properties in __dict__ and __members__ can also reproduce it.
IMO, every UNO object exported in Python should have every method and property explicitely exported and visible as attributes. That's what my current hack is doing in Python.
Not sure if it worth doing this at C level. Maybe a solution like the one I have done would be sufficient (but need to be done cleanly. I am thinking to a quite elegant solution using metaclasses).
I'll think a little depper about this.
For now, what I have done is to declare every method (through the interface's definition decalred by the objet) and properties (idem) in a fake wrapper class.
I have already run my eyes over the C++ code, but not very deeply.
I'll try to investigate the issue you mention (47270) as soon as I have solved my issues with pythonscript.py .
Hi,
> - One thing that I find disappointing is the fact that the UNO
> introspection capabilities are not (as far as I understand, but again,
> I am very new in this code) very well reflected in the pyuno module (at
> least the python way).
>
> - Is there a technical reason (but the lack of dev time) why UNO types,
> classes, services and interfaces are not exported in Python as types and
> classes (rather than instances of an obscure class like it is the case
> for now)?
the python proxy for UNO objects currently does not support the
__members__, __dict__, etc. (see pyuno/source/module/pyuno.cxx
PyUNO_getattr), this is the place, where improvement should take place.
Note that the __members__ attribute currently is even buggy implemented,
using it will lead to a crash (see
http://qa.openoffice.org/issues/show_bug.cgi?id=47270) .
Didn't noticed this issue in QA, but I noticed the bug. My actual python hack to provide methods and properties in __dict__ and __members__ can also reproduce it.
Main reason for not supporting this attributes is actually my lack of
knowledge of these python internas. Which attributes should be supported
from your point of view ?
IMO, every UNO object exported in Python should have every method and property explicitely exported and visible as attributes. That's what my current hack is doing in Python.
Not sure if it worth doing this at C level. Maybe a solution like the one I have done would be sufficient (but need to be done cleanly. I am thinking to a quite elegant solution using metaclasses).
I'll think a little depper about this.
For now, what I have done is to declare every method (through the interface's definition decalred by the objet) and properties (idem) in a fake wrapper class.
Similar things hold for structs and exception (see
pyuno/source/module/pyuno_except.cxx).
I have already run my eyes over the C++ code, but not very deeply.
I'll try to investigate the issue you mention (47270) as soon as I have solved my issues with pythonscript.py .
Bye,
Joerg
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Bye,
David
