Sorry if this has been covered elsewhere, I have searched the forum and cant find anything.
So I have a library which wraps a custom type called Graphic - the wrapper being GraphicWrapper.
Now in another class I have method that returns an array of graphics (ie public Graphic[] getGraphics() etc)
In b4a Im getting the "inconvertible types"
One of the types being reported is Graphic[] and the other is GraphicWrapper[]
How do I deal with this?
1) I have tried to return GraphicWrapper[] but this seems troublesome as I cant easily create an array of GraphicWrappers
2) As a work around I have successfully returned a b4a List of Graphic objects and this works well.
Is approach #2 advisable or is there a better way to handle this?
So I have a library which wraps a custom type called Graphic - the wrapper being GraphicWrapper.
Now in another class I have method that returns an array of graphics (ie public Graphic[] getGraphics() etc)
In b4a Im getting the "inconvertible types"
One of the types being reported is Graphic[] and the other is GraphicWrapper[]
How do I deal with this?
1) I have tried to return GraphicWrapper[] but this seems troublesome as I cant easily create an array of GraphicWrappers
2) As a work around I have successfully returned a b4a List of Graphic objects and this works well.
Is approach #2 advisable or is there a better way to handle this?