B4J Question [ABMaterial] Undeclared Variable BuildSimpleItem

jinyistudio

Well-Known Member
Licensed User
Longtime User
Hi

My version is 2.2. why ide give me message as "Undeclared Variable BuildSimpleItem is used before it was assigned any value" ? :confused:

B4X:
' create list
    Dim list1 As ABMList
    list1.Initialize(page, "list1", ABM.COLLAPSE_ACCORDION, "list1theme")
    ' add items
    list1.AddItem("H1", BuildSimpleItem("L1H1","mdi-action-account-circle","Family"))
    list1.AddSubItem("H1", "S1", BuildSimpleItem("L1H1S1","", "Mom"))
    list1.AddSubItem("H1", "S2", BuildSimpleItem("L1H1S2","", "Dad"))
    list1.AddSubItem("H1", "S3", BuildSimpleItem("L1H1S3","", "Brother"))
    list1.AddSubItem("H1", "S4", BuildSimpleItem("L1H1S4","", "Sister"))
 

jinyistudio

Well-Known Member
Licensed User
Longtime User
Hi

Sorry, I has found it in your demo project ! :p

B4X:
Sub BuildSimpleItem(id As String, icon As String, Title As String) As ABMLabel
    Dim lbl As ABMLabel
    If icon <> "" Then
        lbl.Initialize(page, id, Title, ABM.SIZE_H6, True, "header")
    Else
        lbl.Initialize(page, id, Title, ABM.SIZE_H6, True, "")
    End If
    lbl.VerticalAlign = True
    lbl.IconName = icon
    Return lbl
End Sub
 
Upvote 0
Top