Hi Stephan,

I extend the code below for better understanding, what I mean.

>> -----%<-----
>> System.out.println(this.xComponent);
>>
>> XModel xModel = (XModel)UnoRuntime.queryInterface(XModel.class,
>>     this.xComponent);
>> System.out.println(xModel);
>>
>> XController xController = xModel.getCurrentController();
>> System.out.println(xController);
>>
>> XComponent myComp = (XComponent)
>>     UnoRuntime.queryInterface(XComponent.class,
>>              xController);
>> System.out.println(myComp);

XStorable xStorable = (XStorable)
        UnoRuntime.queryInterface(XStorable.class, myComp);

// This will be null
System.out.println(xStorable);

xStorable = (XStorable)
        UnoRuntime.queryInterface(XStorable.class, this.xComponent);

// This is the correct XStorable
System.out.println(xStorable);
>> -----%<-----

Am I right when I assume that myComp is the same as in the first line
and that it does not make a difference in using it?

If so, why is the xStorable derived from myComp = null and the xStorable
derived from this.xComponent the correct value?

Maybe this behaviour is correct. If so, please tell me why. What I want
to explain all the time is, that I think there should be no difference
using myComp and this.xComponent, but it is a great difference.

> Excuse my ignorance, but in how far does myComp not offer the
> functionality of an XComponent?  The functionality of XComponent is to
> offer a protocol (see the UNOIDL documentation of XComponent for
> details) involving the three methods dispose, addEventListener,
> removeEventListener.  Your above code does not make any use of myComp
> that would back your claim that myComp "does NOT offer the functionality
> of an XComponent."

Thank you for your patience and that you do not give up understanding
me. I really appreciate your efforts in understanding me!

Greetings, Tobias

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

Reply via email to