ref https://www.b4x.com/android/forum/t...native-to-autocompleteedittext.19379/#content
the above link sample is working in activity form. when i try to run from b4xpage, it says the following error message. What could be the problem ?
Logger connected to: samsung SM-G615F
--------- beginning of crash
--------- beginning of main
Error occurred on line: 69 (SearchView)
java.lang.RuntimeException: Object should first be initialized (ListView).
Did you forget to call Activity.LoadLayout?
at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:67)
at anywheresoftware.b4a.objects.ListViewWrapper.Clear(ListViewWrapper.java:197)
at b4a.example.searchview._et_textchanged(searchview.java:224)
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:10745)
at android.widget.TextView.setText(TextView.java:6059)
at android.widget.TextView.setText(TextView.java:5876)
at android.widget.EditText.setText(EditText.java:143)
at android.widget.TextView.setText(TextView.java:5833)
at android.widget.TextView.setTransformationMethod(TextView.java:2944)
at android.widget.TextView.applySingleLine(TextView.java:10373)
at android.widget.TextView.setInputType(TextView.java:6331)
at anywheresoftware.b4a.objects.EditTextWrapper.setInputType(EditTextWrapper.java:187)
at b4a.example.searchview._initialize(searchview.java:280)
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.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:61)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:162)
at anywheresoftware.b4a.objects.PanelWrapper.LoadLayout(PanelWrapper.java:134)
at b4a.example.groups$ResumableSub_B4XPage_Created.resume(groups.java:114)
at b4a.example.groups._b4xpage_created(groups.java:64)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:318)
at anywheresoftware.b4a.debug.Debug.CallSubNew2(Debug.java:285)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.keywords.Common.CallSubDebug2(Common.java:1055)
at b4a.example.b4xpagesmanager._createpageifneeded(b4xpagesmanager.java:1023)
at b4a.example.b4xpagesmanager._showpage(b4xpagesmanager.java:413)
at b4a.example.b4xpages._showpage(b4xpages.java:109)
at b4a.example.b4xpage3._lviewdrawer_itemclick(b4xpage3.java:583)
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.BA$1.run(BA.java:352)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:7025)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
the above link sample is working in activity form. when i try to run from b4xpage, it says the following error message. What could be the problem ?
B4X:
Private Sub B4XPage_Created (Root1 As B4XView)
ime.Initialize("ime")
ime.AddHeightChangedEvent
Root = Root1
Root.LoadLayout("groupslist")
Logger connected to: samsung SM-G615F
--------- beginning of crash
--------- beginning of main
Error occurred on line: 69 (SearchView)
java.lang.RuntimeException: Object should first be initialized (ListView).
Did you forget to call Activity.LoadLayout?
at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:67)
at anywheresoftware.b4a.objects.ListViewWrapper.Clear(ListViewWrapper.java:197)
at b4a.example.searchview._et_textchanged(searchview.java:224)
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:10745)
at android.widget.TextView.setText(TextView.java:6059)
at android.widget.TextView.setText(TextView.java:5876)
at android.widget.EditText.setText(EditText.java:143)
at android.widget.TextView.setText(TextView.java:5833)
at android.widget.TextView.setTransformationMethod(TextView.java:2944)
at android.widget.TextView.applySingleLine(TextView.java:10373)
at android.widget.TextView.setInputType(TextView.java:6331)
at anywheresoftware.b4a.objects.EditTextWrapper.setInputType(EditTextWrapper.java:187)
at b4a.example.searchview._initialize(searchview.java:280)
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.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:61)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:162)
at anywheresoftware.b4a.objects.PanelWrapper.LoadLayout(PanelWrapper.java:134)
at b4a.example.groups$ResumableSub_B4XPage_Created.resume(groups.java:114)
at b4a.example.groups._b4xpage_created(groups.java:64)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:318)
at anywheresoftware.b4a.debug.Debug.CallSubNew2(Debug.java:285)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.keywords.Common.CallSubDebug2(Common.java:1055)
at b4a.example.b4xpagesmanager._createpageifneeded(b4xpagesmanager.java:1023)
at b4a.example.b4xpagesmanager._showpage(b4xpagesmanager.java:413)
at b4a.example.b4xpages._showpage(b4xpages.java:109)
at b4a.example.b4xpage3._lviewdrawer_itemclick(b4xpage3.java:583)
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.BA$1.run(BA.java:352)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:7025)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)