Android Question B4X Keywords in Smart String Literal not Working

Jack Cole

Well-Known Member
Licensed User
Longtime User
I am trying to set up a smart string literal that contains B4X code within it. The problem is that the IDE does not appear to be parsing it correctly (not seeing it as a string). See the following code and attached image for what actually occurs in the IDE.

B4X:
Dim CodeString As String = $"
'enable or disable all buttons in a list
Sub SetButtonsEnabled(ButtonsList as List, Enabled as Boolean)
    For Each b as Button in ButtonsList
        b.Enabled=Enabled
    Next
End Sub
"$

1656807913963.png


Any ideas?
 
Top