I have the following problem.
I've got three types. And three parameters which uses these types.
I'm using the xmlparser to read the xml file. Therefor i've got global strings and i use an endelement to fill thes strings. When the last string has been read i fill fzending.
Same goes for fregel
Eventually i want to add also a list to fzending.zendingregels.barcode (fBarcode).
The program failes at fZending.Zendingregels.add
Initializing with fzending.zendingregels.initialize doesn't have an effect.
Any thoughts?
I've got three types. And three parameters which uses these types.
B4X:
Sub Process_Globals
Type TBarcodes(volgnr As Int, _
barcode As String, _
Type Tregel (regel_id As String, _
aantal As Int, _
eenheid As String,
barcode as list)
Type TZending (zendingid As String, _
vrachtnr As String, _
o_naam As String, _
Zendingregels As List)
Dim fZending As TZending
Dim fregel As Tregel
Dim fbarcode As TBarcodes
Dim z01, z03 as string
dim r01, r02 as string
I'm using the xmlparser to read the xml file. Therefor i've got global strings and i use an endelement to fill thes strings. When the last string has been read i fill fzending.
Same goes for fregel
B4X:
Sub PDA_EndElement (Uri As String, Name As String, Text As StringBuilder)
If Name = "z03" then
Dim fZendingx As TZending
fzendingx.initialize
fZendingx.BestelLijst = z01
fZendingx.zendingid = z03
fZending.initialize
fZending = fZendingx
end if
'then i read the lines (this can be multiple)
If Name = "r" then
Dim fRegelx As Tregel
Dim fZendingx as Tzending
fRegelx.Initialize
fRegelx.regel_id = r01
fRegelx.aantal = r02
'next i want to add fRegelx to fZending
fzendingx.initialize
fzendingx = fzending
fzendingx.zendingregels.initialize
fzendingx.zendingregels.add(fRegelx)
fzending=fzendingx
end if
Eventually i want to add also a list to fzending.zendingregels.barcode (fBarcode).
The program failes at fZending.Zendingregels.add
Initializing with fzending.zendingregels.initialize doesn't have an effect.
Any thoughts?
Last edited: