I am trying to load a layout within the PreferencesDialog based upon a previous PreferencesDialog selection.
i.e. Dialog 1 - I would like to sign up? (Boolean view), if they select True, load a new dialog that has b4xFloatTextFields for name, address...etc.
Currently, the Boolean layout works fine at level one. ALSO, the name, address,...JSON works fine if it is the FIRST layout to be loaded. However, when I clear the first dialog and try to load the second one (name, address...), the first b4xFloatTextField view, which is loaded with the textitem.bal (from Erel's example), I get the error:
Please note that this works fine if I load this JSON file FIRST, but the link to the second dialog, I'm missing something that will allow me to remove the first dialog and then create a new dialog.
I'm using Erel's example and extending it.
Any advice will be appreciated.
Rusty
i.e. Dialog 1 - I would like to sign up? (Boolean view), if they select True, load a new dialog that has b4xFloatTextFields for name, address...etc.
Currently, the Boolean layout works fine at level one. ALSO, the name, address,...JSON works fine if it is the FIRST layout to be loaded. However, when I clear the first dialog and try to load the second one (name, address...), the first b4xFloatTextField view, which is loaded with the textitem.bal (from Erel's example), I get the error:
DecorView setVisiblity: visibility = 8, Parent = ViewRoot{32c8a97 b4a.formstest/b4a.formstest.main,ident = 2}, this = DecorView@c377b51[]
Class not found: b4a.example.b4xfloattextfield, trying: b4a.formstest.b4xfloattextfield
Error occurred on line: 407 (B4XFloatTextField)
java.lang.RuntimeException: Object should first be initialized (B4XView).
at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:50)
at anywheresoftware.b4a.objects.B4XViewWrapper.asViewWrapper(B4XViewWrapper.java:69)
at anywheresoftware.b4a.objects.B4XViewWrapper.getParent(B4XViewWrapper.java:166)
at b4a.formstest.clspreferencesdialog._b4xfloattextfield1_textchanged(clspreferencesdialog.java:1346)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:1083)
at anywheresoftware.b4a.keywords.Common.CallSubNew3(Common.java:1046)
at b4a.formstest.b4xfloattextfield._tf_textchanged(b4xfloattextfield.java:985)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.objects.EditTextWrapper$1.afterTextChanged(EditTextWrapper.java:83)
at android.widget.TextView.sendAfterTextChanged(TextView.java:8576)
at android.widget.TextView.setText(TextView.java:4548)
at android.widget.TextView.setText(TextView.java:4396)
at android.widget.EditText.setText(EditText.java:95)
at android.widget.TextView.setText(TextView.java:4371)
at android.widget.TextView.setTransformationMethod(TextView.java:1976)
at android.widget.TextView.applySingleLine(TextView.java:8242)
at android.widget.TextView.setSingleLine(TextView.java:8217)
Please note that this works fine if I load this JSON file FIRST, but the link to the second dialog, I'm missing something that will allow me to remove the first dialog and then create a new dialog.
I'm using Erel's example and extending it.
Any advice will be appreciated.
Rusty