B4J Question Fix me my warning #2

universengo

Member
My code is as below:
Code: Copy
Sub txtAreaNull (txtLM As TextArea, tb As String) As Boolean
    Dim tNull As Boolean = False
    If txtLM.Text="" Then
        fx.Msgbox(Main.MainForm,tb,"Warning!")
        txtLM.RequestFocus
        tNull = True
        Return tNull
    End If
End Sub

The log is
Not all code paths return a Value. (warning #2)

Nobody help me to fix this error.
Thanks.
 
Code: Copy
Sub txtAreaNull (txtLM As TextArea, tb As String) As Boolean
    Dim tNull As Boolean = False
    If txtLM.Text="" Then
        fx.Msgbox(Main.MainForm,tb,"Warning!")
        txtLM.RequestFocus
        tNull = True
        Return tNull
    End If
    Return tNull
End Sub
 
Upvote 0
Upvote 0
Back
Top