B4J Question [ABMaterial] ABmCheckBox Unknow source

jinyistudio

Well-Known Member
Licensed User
Longtime User
Hi, why line 425 is OK but line 426 is NG :mad:

My checkbox putting in ABMTable.
I can change state.
B4X:
Sub tipsUndo_Clicked(Target As String)
    If tips.Size>0 Then
        Dim table1 As ABMTable=extraSideBar.Content.Component("table1")
        For n1=1 To tips.size
            Dim chk1 As ABMCheckbox=table1.GetComponent(n1-1,"chk"&n1)
            chk1.State=True
            chk1.Refresh
        Next
    End If
    'ABMShared.NavigateToPage(ws, ABMPageId, "./" & InitialPage)
End Sub

I cann't read state
B4X:
Sub tipsDelete_Clicked(Target As String)
    If tips.Size>0 Then
        Dim table1 As ABMTable= extraSideBar.Content.Component("table1")
        For n1=1 To tips.size
            Dim chk1 As ABMCheckbox = table1.GetComponent(n1-1,"chk"&n1)
            If chk1.State Then
                Dim s1 As String=table1.GetString(n1-1,0)
                If s1<>"" Then
                    If File.Delete(File.DirApp&DownloadFolder,s1) Then
                    tips.RemoveAt(n1-1)               
                    End If
                End If
            End If
        Next
        Savetips
        BuildTableList(True)
    End If   
    'ABMShared.NavigateToPage(ws, ABMPageId, "./" & InitialPage)
End Sub

61e777cb42c49be32c425d7ad5b99dbe.png
 
Last edited:

alwaysbusy

Expert
Licensed User
Longtime User
This has also been reported for the ABMSwitch in a table, but I'm waiting on some more info on this. If I find why this happens with the ABMSwitch, the same fix will probably work also for the ABMCheckbox as it uses a similar system to get the Future.

Know that ABMComponents really are not made to be used in an ABMTable for edit purposes, only for display purposes. So some work, some don't.
 
Upvote 0
Top