Dim QtdTpItens As Int = 50
Type TpItem(taborig As String, id As Int, Qtd As Double)
Public TpItem(QtdTpItens) As TpItem
Dim QtdTpPedItens As Int = 50
Type TpPed(id As Int, fpgto As Int, fentr As Int, TpItem As TpItem)
Public TpPed(QtdTpPedItens) As TpPed
Main.TpPed(0).TpItem=Array(Main.TpItem)
Starter.kvs.Put("tpped", Main.TpPed)
Thanks for the fast reply, but with your suggestion I get aMaybe?B4X:Main.TpPed(0).TpItem=Main.TpItem
Log("**************** TpPed(0).TpItem " & TpPed(0).TpItem)
Dim TpItemObj() As Object = TpPed(0).TpItem 'the array type must be object or bytes
Dim ct1 = TpItemObj(0) As TpItem
Log("******************* ct1.id " & ct1.id)
Starter.kvs.Put("tpped", Main.TpPed)
Guten Morgen!Please upload the project (File - Export as zip).
The type of: Main.TpPed(0).TpItem is TpItemT.
It is not an array. This line is wrong:
It will work with:B4X:Main.TpPed(0).TpItem=Array As TpItemT(ct, ct1)
B4X:Main.TpPed(0).TpItem = ct
Good Morning,I don't get this error. Can you upload the updated project?
Thanks a lot for your orientation. As Im not so expert I have to take a look in my project to undertand how to switch, but I count on your help to clarify questions that may raise. Thanks a lot.Tip: Lists are more powerful than arrays. It is true that you need to first get the item from the list and only then call the object methods, but still I think that it is worth switching to Lists.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?