Stephan Bergmann wrote:
Rony G. Flatscher wrote:
... cut ...

Just curious: how do you write down in ooRexx calls to method bar on an object that implements the two interfaces

  module m1 { interface XFoo { void bar(); }; };
  module m2 { interface XFoo { void baz(); }; };

Hmm, good question.

Could you please hint how you would do that in Java (pseudo-code suffices, ie. without casting)? Reason being, that whatever can be done via Java can be done in ooRexx (using a very relaxed, almost pseudo-code like syntax).

In Java:

  import m1.XFoo; // the key to using short, unambiguous "XFoo" later on
  ...
  Object o = ...;
  XFoo foo = (XFoo) UnoRuntime.queryInterface(XFoo.class, o);

  foo.bar();
Oh, o.k., then this is how you would do it in ooRexx:
o~XFoo~bar
---rony

P.S.: ooRexx is not case-sensitive, and the message operator may be surrounded by blanks as well, so the following statement would be valid as well (although it may look weird at first):
o ~ xfoo ~ bar




Reply via email to