Sub Class_Globals
Private Root As B4XView
Private xui As XUI
Private Button1 As B4XView
Private fontArial_13 As B4XFont ' <---- Declare the variable but never assign a value to it
End Sub
Public Sub Initialize
' B4XPages.GetManager.LogEvents = True
End Sub
'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("MainPage")
' With the next line commented out, there is a compiler warning:
' B4XMainPage - 13: Variable 'fontArial_13' is never assigned any value. (warning #10)
' When the line is 'active', the compiler warning disappears, and there is no
' run time error either; when running the app, the button's text disappears:
Button1.Font = fontArial_13
End Sub