Android Question MLCombobox v1.28 library: Runtime error

toby

Well-Known Member
Licensed User
Longtime User
When I tried to compile the test project (this is also where I got the library, btw) as it is, I got the follow runtime error
Logger connected to: Google Pixel 4a
--------- beginning of main
Copying updated assets files (1)
** Activity (main) Create, isFirst = true **
java.lang.NoSuchMethodError: No virtual method AddSingleLine(Ljava/lang/String;)V in class Lanywheresoftware/b4a/objects/ListViewWrapper; or its super classes (declaration of 'anywheresoftware.b4a.objects.ListViewWrapper' appears in /data/app/~~JgstDRXds0I-eV-9wFqBlg==/org.mlsoft-Y1m-oBBSBoxd3wWzmi3nzQ==/base.apk)
at org.mlsoft.mlcombobox._additem(mlcombobox.java:75)
at org.mlsoft.main._activity_create(main.java:414)
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:348)
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 org.mlsoft.main.afterFirstLayout(main.java:105)
at org.mlsoft.main.access$000(main.java:17)
at org.mlsoft.main$WaitForLayout.run(main.java:83)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
** Activity (main) Resume **

Anyone knows what went wrong and how to fix it?
 

toby

Well-Known Member
Licensed User
Longtime User
The author of that lib has not been around for years. Why not use a well supported B4XComboBox from Xui Views lib

Thank you for quick reply!

I noticed that the last time there were some activity with MLCombobox was sometime in 2014, long time ago, but it's the only thing I could find that indicated text can be entered optionally.

I did tried B4XComboBox first, and couldn't enter any text. Also it didn't work for me. I'll create another thread
 
Upvote 0

mcqueccu

Well-Known Member
Licensed User
Longtime User
Hi Toby. Good to hear from you. The author of that lib has not been around for years. Why not use a well supported B4XComboBox from Xui Views lib

The Author was last seen Tuesday.

May be you can also PM to the author. Or you could try the B4Xcombobox as suggested, maybe redo the UI with textbox with the combo box to suit your purpose
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
The Author was last seen Tuesday.
Read post #137 here:
I did tried B4XComboBox first, and couldn't enter any text.
I know, you are generous with your 'like', but at time, the answers you receive do not solve your issue. Can you please show what you ended up doing to solve this issue, as it is a very important one.
 
Upvote 0

toby

Well-Known Member
Licensed User
Longtime User
I know, you are generous with your 'like'
I usually gave a Like for every response to my request for help to show my appreciation for his/her effort to help. Therefore you indeed deserve all the Likes I've given you including this one?

Can you please show what you ended up doing to solve this issue, as it is a very important one.
I also posted a related Wish https://www.b4x.com/android/forum/t...e-instead-of-selecting-one.129853/post-816627 and @Erel gave me some hint, I then produced some code snippet based on @Erel's. It's not exactly the same as VB's Combobox but it suits my needs; a dialog will popup. In my app, I use a label to show current value and once tapped a Search template dialog appears to allow user to either select an item or enter a new item. Tapping OK will cause whatever is typed to be returned as a new item. The code is included at the above link and you can enhance it for your own needs.
 
Upvote 0
Top