I have this class... SerializableOpenOrder...
I have built a List containing some number of OpenOrderLine. I'm trying to get lines of this list into the lines() array of the serializable open order class instance.
I was hoping the list would self cast to an array, but that does not work.
Next I tried to REDIM the lines array in my SerializableOpenOrder object instance, and then copy all elements from the list to the array (using a loop). I can not seem to get soo.ines redimensioned so that it can accept items from my dynamic list. What is the trick please?
B4X:
Sub Class_Globals
Public header As OpenOrderHeader
Public lines() As OpenOrderLine
End Sub
I have built a List containing some number of OpenOrderLine. I'm trying to get lines of this list into the lines() array of the serializable open order class instance.
I was hoping the list would self cast to an array, but that does not work.
B4X:
Dim soo as SerializableOpenOrder
soo.Initialize
soo.lines = mylist
Next I tried to REDIM the lines array in my SerializableOpenOrder object instance, and then copy all elements from the list to the array (using a loop). I can not seem to get soo.ines redimensioned so that it can accept items from my dynamic list. What is the trick please?