Android Question Missing Keyword: end sub ???

David S

Member
Licensed User
Longtime User
B4X:
Sub totalAmountEditText_FocusChanged (HasFocus As Boolean)

    If m_flgTotalFirstTime Then
   
        If totalAmountEditText.Text = "0.00"    ' only for the first time
            totalAmountEditText.Text = ""
        End If
       
        m_flgTotalFirstTime = False
       
    End If
   
End Sub

The code above is coming up with the following error....

Error parsing program.
Error description: Missing Keyword: end sub
Occurred on line: 147
End If

So why is this causing the above error??? I can't find any documentation that would explain this.

David
 

David S

Member
Licensed User
Longtime User
So after staring at this at 5am for 1/2 hour and not seeing the problem I come back at 9:30pm and I see the problem. Can you spot the missing "Then"?

:oops:

I also see the moderator moderated my views/controls rant. lol
 
Upvote 0

Ohanian

Active Member
Licensed User
Longtime User
Hi,

B4X:
If totalAmountEditText.Text = "0.00" THEN ' only for the first time <<
 
Upvote 0

David S

Member
Licensed User
Longtime User
Thanks... but post #2 was a rhetorical question after I spotted the fact I had missed the "then". lol
 
Upvote 0
Top