Hello all,
Why am I getting this error while trying to use jRTF library ?
java.lang.IllegalArgumentException: expected receiver of type com.tutego.jrtf.Rtf, but got java.lang.Class<com.tutego.jrtf.Rtf>
Here is my code
The error is raised on the last line
mjrtf.RunMethodJO("out",Array(writer))
Please tell me in as much details as possible .
Thanks in advance
Why am I getting this error while trying to use jRTF library ?
java.lang.IllegalArgumentException: expected receiver of type com.tutego.jrtf.Rtf, but got java.lang.Class<com.tutego.jrtf.Rtf>
Here is my code
B4X:
Sub jrtf2java
Dim mjrtf As JavaObject
mjrtf.InitializeStatic("com.tutego.jrtf.Rtf")
Dim RtfText As JavaObject
RtfText.InitializeStatic("com.tutego.jrtf.RtfText")
RtfText.RunMethodjo("bold",Array( "Hello RTF")).RunMethod("toString",Null)
Dim writer As JavaObject
writer.InitializeNewInstance("java.io.FileWriter",Array(File.Combine(File.DirRootExternal,"mout.doc"),False))
mjrtf.RunMethodJO("out",Array(writer))
End Sub
The error is raised on the last line
mjrtf.RunMethodJO("out",Array(writer))
Please tell me in as much details as possible .
Thanks in advance