I am attempting to create an instance of a class that requires an array of an specific type of object in the constructor. The log shows that the constructor is not found which I assume is because Object[] is being passed, as opposed to an array of the correct type.
(using GraphView library)
What would be the solution in these cases?
ps, I know the library is partially wrapped for b4a already, but it doesn't work in Portrait over here and that's not the point anyway
B4X:
Dim jo, gvd1, gvd2, gvd2 As JavaObject
Dim a As Double = 1. : Dim d As Double = 2.
gvd1 = jo.InitializeNewInstance(pck&"GraphView.GraphViewData", Array(a, d))
a = 2 : d=1.5
gvd2 = jo.InitializeNewInstance(pck&"GraphView.GraphViewData", Array(a, d))
'constructor not found thrown here... constructor expects GraphViewData[]
exampleSeries=jo.InitializeNewInstance(pck&"GraphViewSeries", Array(Array(gvd1, gvd2)))
(using GraphView library)
What would be the solution in these cases?
ps, I know the library is partially wrapped for b4a already, but it doesn't work in Portrait over here and that's not the point anyway