B4J Question Read list back to type or array

Siam

Active Member
Licensed User
Longtime User
Hi,

how can i the result of qubics.Get(1) = [IsInitialized=false, minerName=miner2, Solutions=5, itsec=55, lastseen=1712409074077] send to an array or better back to my type ?


B4X:
#Region Project Attributes
    #MainFormWidth: 600
    #MainFormHeight: 600
#End Region

Sub Process_Globals
    Private fx As JFX
    Private MainForm As Form
    Private xui As XUI
    Private Button1 As B4XView
    Type qubic(minerName As String, Solutions As Int, itsec As Int, lastseen As Long)
End Sub

Sub AppStart (Form1 As Form, Args() As String)
    MainForm = Form1
    MainForm.RootPane.LoadLayout("Layout1")
    MainForm.Show
    
    Dim qubics As List
    qubics.Initialize
    
    Dim p As qubic
    p.minerName = "miner1"
    p.Solutions = 3
    p.itsec = 33
    p.lastseen = 1712409074077

    qubics.Add(p)
    
    Dim p As qubic
    p.minerName = "miner2"
    p.Solutions = 5
    p.itsec = 55
    p.lastseen = 1712409074077

    qubics.Add(p)
    
    Log (qubics.Get(1))
End Sub

Sub Button1_Click
    xui.MsgboxAsync("Hello World!", "B4X")
End Sub
 
Top