I have a For loop, and I do and InsertAt on every item of the For, inside the loop itself, I can see that the correct values got added. But outside of the loop all values are the same in the list, somehow only the last item of the loop got replicated on all items in the list
B4X:
For i = 0 To rows.Size - 1
Dim m As Map
m = rows.Get(i)
pedidoCab.name = m.Get("name")
pedidoCab.direccion = m.get("direccion")
pedidoCabeceraSolicitado.InsertAt(i,pedidoCab)
MsgboxAsync(pedidoCabeceraSolicitado.Get(i),"En el for")
pedidosDetalleTarjetaSolicitados.Add(CreateItemPedidoCabSolicitado(pedidosDetalleTarjetaSolicitados.AsView.Width,Main.idpedido,nombreCliente,direccionLocal,estadoPedido,fecha),"")
Next
Last edited: