Hi all,
I use a list to store an array of information
I want to go trough the list and change a value in that array:
It looks like it is adding the the aantal, but when I caal this sub again. It shows the initial value
Any thoughts ?
I use a list to store an array of information
I want to go trough the list and change a value in that array:
B4X:
Sub AddToVerkoopList(Gevr_ProdGeg As ProductGegevens)
Dim prodteller As Int
Dim CurProd As ProductGegevens
CurProd.Initialize
Dim Gevonden As Boolean
For i = 0 To VerkoopList.Size-1
CurProd = VerkoopList.Get(i)
If Gevr_ProdGeg.Naam = CurProd.Naam Then '// dus exact het zelfde
CurProd.Aantal = CurProd.Aantal + Gevr_ProdGeg.Aantal'Gevr_ProdGeg.Aantal
VerkoopList.Set(i,CurProd)
Gevonden = True
Exit
End If
Next
If Gevonden = False Then VerkoopList.Add(Gevr_ProdGeg)
End Sub
It looks like it is adding the the aantal, but when I caal this sub again. It shows the initial value
Any thoughts ?