Greetings,
I'm trying out this class in B4A and get a null pointer error when trying to set the selection mode. The coding is based on the sample code from where I got the class from.
The class came from here.
I'm trying out this class in B4A and get a null pointer error when trying to set the selection mode. The coding is based on the sample code from where I got the class from.
B4X:
java.lang.NullPointerException: Attempt to invoke virtual method 'int anywheresoftware.b4a.objects.collections.List.getSize()' on a null object reference
B4X:
Sub InitializeWhatsNeeded
strShared = rp.GetSafeDirDefaultExternal("Settings")
kvs.Initialize(strShared, "Settings")
CSelections.Initialize(clvSongList)
CSelections.Mode = CSelections.MODE_MULTIPLE_ITEMS
End Sub
Sub clvSongList_ItemClick (Index As Int, Value As Object)
CSelections.ItemClicked(Index)
kvs.Put("CurrentSongSelected", Index +1)
Dim iv As typListItemValues = Value
Log("You clicked song title: " & iv.LabelSongTitle & " " & iv.strSomeMoreText)
End Sub
The class came from here.