Hello,
I have an interesting problem and it goes as follows:
1) I define a global spinner:
Dim geometricBtn As Spinner
2) I try to initialize the spinner (not included in any designer layout):
geometricBtn.Initialize("geometricBtn")
3) then I get the following error:
LogCat connected to: emulator-5554
** Activity (main) Create, isFirst = true **
java.lang.RuntimeException: Don't call setOnClickListener for an AdapterView. You probably want setOnItemClickListener instead
at android.widget.AdapterView.setOnClickListener(AdapterView.java:773)
at anywheresoftware.b4a.objects.ViewWrapper.innerInitialize(ViewWrapper.java:73)
at anywheresoftware.b4a.objects.SpinnerWrapper.innerInitialize(SpinnerWrapper.java:46)
at anywheresoftware.b4a.objects.ViewWrapper.Initialize(ViewWrapper.java:64)
at malta.aeroCalc.main._activity_create(main.java:486)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:175)
at malta.aeroCalc.main.afterFirstLayout(main.java:98)
at malta.aeroCalc.main.access$100(main.java:16)
at malta.aeroCalc.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Could anyone tell me what might be the problem?
Thanks,
Dan
I have an interesting problem and it goes as follows:
1) I define a global spinner:
Dim geometricBtn As Spinner
2) I try to initialize the spinner (not included in any designer layout):
geometricBtn.Initialize("geometricBtn")
3) then I get the following error:
LogCat connected to: emulator-5554
** Activity (main) Create, isFirst = true **
java.lang.RuntimeException: Don't call setOnClickListener for an AdapterView. You probably want setOnItemClickListener instead
at android.widget.AdapterView.setOnClickListener(AdapterView.java:773)
at anywheresoftware.b4a.objects.ViewWrapper.innerInitialize(ViewWrapper.java:73)
at anywheresoftware.b4a.objects.SpinnerWrapper.innerInitialize(SpinnerWrapper.java:46)
at anywheresoftware.b4a.objects.ViewWrapper.Initialize(ViewWrapper.java:64)
at malta.aeroCalc.main._activity_create(main.java:486)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:175)
at malta.aeroCalc.main.afterFirstLayout(main.java:98)
at malta.aeroCalc.main.access$100(main.java:16)
at malta.aeroCalc.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Could anyone tell me what might be the problem?
Thanks,
Dan