B4J Question [BANano] BANano does not support #if?

Mashiane

Expert
Licensed User
Longtime User
Ola

I'm compiling a library and have this sub

B4X:
'get component
Sub ToString As String
    #If debug
    Dim eName As String = $"${ID}_change"$
    If SubExists(Module, eName) = False Then
        Log($"The '${eName}' event has not been defined!"$)
    End If
    eName = $"${ID}_click"$
    If SubExists(Module, eName) = False Then
        Log($"The '${eName}' event has not been defined!"$)
    End If
    #end if
    If hasBadge Then AddComponent(Badge.ToString)
    Return TabItem.ToString
End Sub

its producing error 06, on the line #if. I wanted to have that code only working in debug mode only when using the lib. Isn't this possible?

Ta!
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…