Hi,
I am using the example code shown in Dialogs library 2017 - Custom dialogs and async methods.
I copied the example code using Dialogs 4.01 and the layout file from the example into my own code, and I get an initialisation problem which doesn't appear in the example.
I changed some of the names of the views and this is where the error occurs. It appears that DialogSSID and DialogPassword are not initialised.
This is a modification of the original sub, done in order to debug. It could obviously be neater and shorter, but I was in debug mode
It fails on the DialogSSID.Text.Length check with:
If I comment out the contents of that sub, the dialog shows, but obviously I can't get out of it except by using cancel.
Any help would be much appreciated.
JMB
I am using the example code shown in Dialogs library 2017 - Custom dialogs and async methods.
I copied the example code using Dialogs 4.01 and the layout file from the example into my own code, and I get an initialisation problem which doesn't appear in the example.
I changed some of the names of the views and this is where the error occurs. It appears that DialogSSID and DialogPassword are not initialised.
B4X:
Sub CheckAllFieldsValid
Dim valid As Boolean = False
If DialogSSID.Text.Length > 0 Then
If DialogPassword.Text.Length > 0 Then
valid = True
WifiDialog.GetButton(DialogResponse.POSITIVE).Enabled = valid
End If
End If
End Sub
This is a modification of the original sub, done in order to debug. It could obviously be neater and shorter, but I was in debug mode
It fails on the DialogSSID.Text.Length check with:
B4X:
java.lang.RuntimeException: Object should first be initialized (FloatLabeledEditText).
If I comment out the contents of that sub, the dialog shows, but obviously I can't get out of it except by using cancel.
Any help would be much appreciated.
JMB