Hi,
the following snippet (I left out the callback functions for the
listeners) gives an error:
Sub SaxTest()
Dim aInputSource, xSaxParser, xDocumentHandler
on local Error Goto ErrorHandler
aInputSource = CreateUnoStruct("com.sun.star.xml.sax.InputSource")
xSaxParser = CreateUnoListener("SaxParser","com.sun.star.xml.sax.XParser")
xDocumentHandler =
CreateUnoListener("DocHandler","com.sun.star.xml.sax.XDocumentHandler")
xSaxParser.setDocumentHandler (xDocumentHandler)
exit Sub
ErrorHandler:
msgBox Error & " in line " & erl
End Sub
With .setDocumentHandler() an error occurs, but it is not handled by the
label ErrorHandler.
The com.sun.star.xml.sax.XParser is an Interface without a Service, only
a module.
This UNO-type can only declared as variant with "Dim" so I guess
"xDocumentHandler" or "xSaxParser" have the wrong datatype.
Has anybody experiences with CreateUNOValue() method?
In Java it is very simple to implement this Interface, can this be done
in Basic too?
Regards
Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]