Mathias Bauer wrote:
Rony G. Flatscher wrote:

I have no idea how pyuno does it.  But note that this problem was
there from the beginning, and has nothing to do with the
addition of multiple-inheritance interfaces.  There are, for
example, already cases where one UNO object implements both
XComponent and XEventBroadcaster, and I have no idea how pyuno
handles a call to addEventListener on such an object.  However,
since this problem is there from the beginning, I assume that the
designers of pyuno took care of that in an appropriate manner.


On second thought, all "dynamic" UNO language bindings (where statically you can call any method of any UNO interface that a
given UNO object supports on that object, without mentioning the
specific interface, and where dynamically the runtime dispatches
the method call to the correct interface) are broken:  A method
call (with whatever actual syntax)

someUnoObj#foo()

will work as long as the UNO object referenced by someUnoObj only implements one interface that defines method foo, but will fail as soon as that object also implements another such interface.

:(

Well, but that would induce that one should always explicitly request
the interface (this could be done in a somewhat "nicer" form than in
C++/Java for Basic and the like). Then this problem should not really
pop-up (plus it makes it clearer to the coder which logical "part" of
the object s/he is addressing).


As Stephan pointed out such means do exist in Basic and they are
described in our DevGuide. I don't know if PyUNO has means too so we
must ask people knowing the binding. AFAIK Jörg Budischewski is reading
the udk list so perhaps we should move the discussion there.

In principle we have the necessary mechanisms in Basic and PyUNO (see previous post by Jörg). However, since the existing mechanims are "heavy" and ugly, they are not used consistently in practice. That means that much of the code that is written in those language bindings is fragile. Rony is right in that another approach to the design of those language bindings might have made it easier for users to create robust code.

-Stephan

Besides that we should add a comment to the documentation we provide to
implementers of language bindings that they need to take care of this
problem.

Best regards,
Mathias

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to