I cheked my list on write in file.
T_bitmap is Full/ok
Read my list in file.
Return is Null
I cant understand it. I read mylist. After check values. Bitmap filed is Null!!!!
where is the problem.
T_bitmap is Full/ok
Read my list in file.
Return is Null
where is the problem.
B4X:
Sub sample()
' Type T_MYTypes( _
' URL As String, _
' T_Bitmap As Bitmap, _
' State As Boolean)
'
Dim mylist As List
Dim a1, a2 As T_MYTypes
a1.Initialize
a1.State=True
a1.URL="image 1"
a1.T_Bitmap.Initialize(File.DirAssets,"red.jpg")
a2.Initialize
a2.State=False
a2.URL="image 2"
a2.T_Bitmap.Initialize(File.DirAssets,"green.jpg")
mylist.Initialize
mylist.Add(a1)
mylist.Add(a2)
Dim raf As RandomAccessFile
raf.Initialize(File.DirDefaultExternal,"xxx.dat",False)
raf.WriteObject(mylist,False,raf.CurrentPosition)
raf.Close
DoEvents
Dim raf1 As RandomAccessFile
Dim newlist As List
newlist.Initialize
raf1.Initialize(File.DirDefaultExternal,"xxx.dat",False)
newlist=raf1.ReadObject(raf1.CurrentPosition)
raf1.Close
End Sub