>if you want to programmatically determine all types, you could use the
>com.sun.star.comp.stoc.RegistryTypeDescriptionProvider service.
>For example the climaker uses it to create all cli types from UNO
types. Have a look at >cli_ure/source/climaker/climaker_app.cxx.
>Eventually
com.sun.star.reflection.XTypeDescriptionEnumeration.nextTypeDescription()
>is used to iterate over all available types.
Yes, I tried that - but all I get are empty enumerations ... as an
example an OOBASIC code trying to get
all services from the reflection module ...
REM Smalltalk Source code example ....
REM typeCollection := OrderedCollection new.
REM typeCollection add: OOCSSUnoTypeClass::SERVICE.
REM enumeration := anInstance
REM createTypeDescriptionEnumeration:
'com.sun.star.reflection'
REM types: (OSVariantarg
fromIntegerCollection: typeCollection)
REM depth:
OOCSSReflectionTypeDescriptionSearchDepth::INFINITE .
REM aCollection := OrderedCollection new.
REM [ enumeration hasMoreElements ] whileTrue:[
REM aCollection add: enumeration nextTypeDescription
REM ].
REM aCollection
Sub MyReflectionTest
Dim oTypeDescriptionProvider as Object
Dim enumeration as Object
Dim typeDescription as object
dim valueArray(0)
valueArray(0) = com.sun.star.uno.TypeClass.SERVICE
oTypeDescriptionProvider = CreateUnoService(
"com.sun.star.reflection.XTypeDescriptionEnumeration" )
if not IsNull(oTypeDescriptionProvider) then
enumeration =
oTypeDescriptionProvider.createTypeDescriptionEnumeration("com.sun.star.reflection",
valueArray, -1)
if not isNull(enumeration) then
do while (enumeration.hasMoreElements)
typeDescription = enumeration.nextTypeDescription
MsgBox typeDescription.dbg_methods
loop
endif
endif
End Sub
Marten
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]