On 8/3/05, Mathias Bauer <[EMAIL PROTECTED]> wrote:
Hi Andrzej,
Andrzej Wytyczak-Partyka wrote:

> At this point I finally understood ( at least so I think... ;-) ) what's
> going on here.
> Each time I want some interface from a component I have to query it to get
> it, right?

In its entirety this statement goes too far. ;-)
 
Especially with the 'I understood' part I guess ;-)

Of course you don't need to do this if the interface you want to use is
a base class interface of the one you have. As an example, if you have a
Reference <css.frame.XFrame> you can use it as a Reference
<css.lang.XComponent> directly (and e.g. call "addEventListener" on it)
because css.lang.XComponent is a base class of css.frame.XFrame .

(...)


UNO offers its own way of "RTTI", it consists of the XTypeProvider
interface (for dynamic, inspectional type access) and the
"queryInterface" call.

Ciao,
Mathias

Thanks Mathias and Andreas for explaining this.
It cleared things a bit for me.

I have another question right now.
I want to use this Sequence of structs like that one:

struct sChildWindow {
long m_sID
Reference< XWindow > m_sWindow;
};

but when I declare the Sequence like this :
Sequence< sChildWindow > m_xChildren;

the linker returns an error :
"none of the 105 overloads can convert parameter 1 from type 'const com::sun::star::uno::Sequence<E>::ElementType *'
with E=sChildWindow"

then follows a long list of overloads

and finally :
"while trying to match the argument list '(const com::sun::star::uno::Sequence<E>::ElementType *)'
with E=sChildWindow"

and some more information, that doesn't seem important.

I thought that maybe the template doesn't work because the struct is not typedef,
but I tried typedefing it and it didn't work either. Is it possible that, despite the
template, the Sequence class only works for the 105 mentioned types ?
What should I do if that's the case ?

Regards,
Andrzej

Reply via email to