compile error while checking for empty string

Antonov

New Member
Licensed User
Longtime User
using the math trainer example I declared under Globals:

Dim EdtResult As EditText

Then, on the click-event of a button i am supposed (it's an example from tha manual) to check for nothing being entered in: EdtResult:

37 Sub BtnAction_Click
38 If BtnAction.Text = "Ok" Then
39 If EdtResult = "" Then
40 Msgbox ("Geen antwoord","Sukkel")
41 Else

I get this error:
Compiling generated Java code. Error
B4A line: 39
If EdtResult = \
javac 1.7.0_07
src\b4a\example\main.java:237: error: inconvertible types
if ((mostCurrent._edtresult).equals((android.widget.EditText)(""))) {
^
required: EditText
found: String
1 error

the code: "If EdtResult = NULL Then" gives no compile error but doesn't (obviously) do the job :(

So, how do I (properly) check for an empty string???

Regards, Ton
 
Top