Hi Rony,
Am Donnerstag, 4. August 2005 11:51 schrieb Rony G. Flatscher:
> Hi there,
>
> how is it possible to "navigate" via "theTypeDescriptionManager" to
> "XInterfaceMemberTypeDescription", especially
> "XInterfaceAttributeTypeDescription" and "XInterfaceMethodTypeDescription"?
>
if you use the stuff I described in my last email, having the 
XInterfaceTypeDescription you can directly query for the 
XInterfaceMemberTypeDescription. Calling method getMembers you get a sequence 
of objects. With these objects you can queryInterface for 
XInterfaceAttributeTypeDescription or XInterfaceMethodTypeDescription. If I 
remember correctly, you get an empty response if the object is not of the 
appropriate type (attribute or method), Can't give you a direct example, 
because the work I am doing is in C++/tcluno.

To check if it is a method or an attribute you can use 
com.sun.star.beans.XIntrospection method inspect on the object
you get back from the getMembers call and afterwards use
com.sun.star.beans.XIntrospectionAccess method hasMethod on the object 
returned from the inspect call to check if that is a method or an attribute. 
Be carefull, do not use hasProperty (for check if it is an attribute) at 
first try, because I have found out that methods are sometimes also 
identified as attributes but not the other way around. 
> Tried the xrefs of the online api-doc to no avail (e.g.
> <http://api.openoffice.org/docs/common/ref/com/sun/star/reflection/XInterfa
>ceAttributeTypeDescription-xref.html#devmanrefs>).
>
> TIA,
>
> ---rony
>
> P.S.: Ceterum, censeo, XIdlClass.getInterfaces() would alleviate the
> need to go through the TypeDescriptions..., but if going through that
> branch, it would make sense to use the type information right away to
> determine the attributes and methods there, hence this question...
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
Arnulf

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

Reply via email to