Nice, but this was NOT my question. If you get the information, that
the resulting object is of kind "com.sun.star.text.TextFields ", then
I'm also fine, because my code also gives me all the needed information
I wanted to have.

The question was: how do I find out this information, that the returned
object is of that kind and I tried to show, that this information seems
to be not available by reading the IDL reference documentation.

Regarding the Smalltalk interface: though I generated code for nearly
the whole office suite I concentrate on the Writer part now trying to
find an easy programming model. The good thing is, that I do not
have to convert or request all these interfaces - the methods are there
point. I'm actually using my Smalltalk code to find out how it works,
write small programs and then reused this knowledge when doing C#
stuff.

Actually I'm fine tuning the code generator now and some stuff is still
missing - due to lack of knowledge regarding OLE stuff. Some points:

* I'm able to convert a sequence (from OLE objects) to Smalltalk objects,
 bit I have not found out the other way. That means, that some of the
 generated code having sequences as parameters simply do not work

* Who is responsible for the memory management. I expect to have
 memory leaks - but I do not know, how to fix them right now.

The best thing would be to have a native UNO C bridge I could use, but
this area seems to be very limited documented.

Marten

rony schrieb:
Hi Marten,
Yes, these are hints, but you do not get this information from the IDL
reference
and it seems to be impossible to get this information via reflection.

I created now around 3000 classes from doing reflection of the whole
system and
can't get this information.
The following is an interactive session (starting ooRexx in a command
line window, loading the uno/OOo support by calling the module "uno.cls"
and then querying the definition of the service
"com.sun.star.text.TextFields" using the IDL name) on Windows XP:

    F:\test\ooo>rexxtry
    REXX-ooRexx_3.2.0(MT) 6.02 16 Jun 2008
      rexxtry.rex lets you interactively try REXX statements.
        Each string is executed when you hit Enter.
        Enter 'call tell' for a description of the features.
      Go on - try a few...            Enter 'exit' to end.
    call uno.cls
      ........................................... rexxtry.rex on WindowsNT
    str="com.sun.star.text.TextFields"
      ........................................... rexxtry.rex on WindowsNT
    say ppd(uno.getDefinition(str))
    UNO_SERVICE|com.sun.star.text.TextFields|
            
com.sun.star.container.XEnumerationAccess|UNO_INTERFACE||com.sun.star.text.TextFields
            
com.sun.star.util.XRefreshable|UNO_INTERFACE||com.sun.star.text.TextFields
      ........................................... rexxtry.rex on WindowsNT
So the "XRefreshable" interface gets listed, and very easily so...
:)

---

Behind the curtains the UNO reflection mechanism is used to get to the
information. Wrote a Java wrapper for it, which encodes the results in
form of a string, that can be easily parsed according to p.2. on
<http://wi.wu-wien.ac.at/rgf/rexx/bsf4rexx/current/refcardOOo.pdf>,
right-most column, section entitled "Table “UNOIDL String Encodings”".

If you can interface with Java "behind the curtain" from Smalltalk then
please say so and I will direct you to where to get that Java wrapper
class (it took me *quite* some efforts to create it, but it works on all
platforms: Linux, Macs, and Windows), which may help you as well in your
efforts.

---rony

P.S.: Of course I am always interested in seeing the Smalltalk snippets
from time to time to relate to another posting of yours...




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

Reply via email to