Android Question Unexpected event (missing RaiseSynchronousEvents): sv_scrollchanged

leemizu

Member
Dear All
I want to make table, but thee is problem in here
and I don't know where the probem is ?
Please help me
Thank you


B4X:
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = true **
** Activity (absen) Create, isFirst = true **
** Activity (absen) Resume **
** Activity (absen) Pause, UserClosed = true **
** Activity (intable) Create, isFirst = true **
You may get this warning:
Unexpected event (missing RaiseSynchronousEvents): sv_scrollchanged
Ignore it, it is NOT harmful !
Error occurred on line: 1504 (intable)
java.lang.NumberFormatException: empty String
    at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1842)
    at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
    at java.lang.Double.parseDouble(Double.java:538)
    at b4a.example.intable._formatnumbers(intable.java:506)
    at b4a.example.intable._activity_create(intable.java:433)
    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 b4a.example.intable.afterFirstLayout(intable.java:105)
    at b4a.example.intable.access$000(intable.java:17)
    at b4a.example.intable$WaitForLayout.run(intable.java:83)
    at android.os.Handler.handleCallback(Handler.java:883)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loop(Looper.java:230)
    at android.app.ActivityThread.main(ActivityThread.java:7806)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:508)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1034)
** Activity (intable) Resume **
 

klaus

Expert
Licensed User
Longtime User
The error says that you try to convert an empty string into a number.
But, unfortunately you don't give enough information.
What Table are you speaking of.
You should post the code you are using.
The best way to help you would be if you posted your project as a zip file, so we could test it in the same conditions as you do.

Zip your project directly in the IDE:
1599121466444.png
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
You have a warning and an error there. As the log says ignore the unexpected event warning. WIthout code we cannot comment on the format error but it looks like 'intable' might be an activity module in which case the error is in a Sub called 'FormatNumbers' which is being given a format it doesn't recognize.
 
Upvote 0

leemizu

Member
The error says that you try to convert an empty string into a number.
But, unfortunately you don't give enough information.
What Table are you speaking of.
You should post the code you are using.
The best way to help you would be if you posted your project as a zip file, so we could test it in the same conditions as you do.

Zip your project directly in the IDE:
View attachment 99495
This my code
please help me
 

Attachments

  • ABSENSI_APP1.zip
    52.7 KB · Views: 171
Upvote 0

leemizu

Member
You have a warning and an error there. As the log says ignore the unexpected event warning. WIthout code we cannot comment on the format error but it looks like 'intable' might be an activity module in which case the error is in a Sub called 'FormatNumbers' which is being given a format it doesn't recognize.

You are right
but I have another problem
B4X:
You may get this warning:
Unexpected event (missing RaiseSynchronousEvents): sv_scrollchanged
Ignore it, it is NOT harmful !
Error occurred on line: 1183 (Table)
java.lang.ArrayIndexOutOfBoundsException: length=2; index=5
    at b4a.example.table._getvalue(table.java:1905)
    at b4a.example.intable._formatnumbers(intable.java:508)
    at b4a.example.intable._activity_create(intable.java:435)
    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 b4a.example.intable.afterFirstLayout(intable.java:105)
    at b4a.example.intable.access$000(intable.java:17)
    at b4a.example.intable$WaitForLayout.run(intable.java:83)
    at android.os.Handler.handleCallback(Handler.java:883)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loop(Looper.java:230)
    at android.app.ActivityThread.main(ActivityThread.java:7806)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:508)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1034)
** Activity (intable) Resume **
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
I had a look at your program.
The main problem is that you have copied the code from the Table demo program into an Activity module and try to adapt it.
In the Table.bas module you have removed all the version history, you should at least have left the last version number to know which version you are using.
I have cleaned up your project.
To load your database just one line of code is needed.
All the properties can be set in the Designer.

The problems:
1. In the demo program there is this routine: FormatNumbers(Table1, 5, 2)
It works in the demo program, but not in your case because in your database you have empty strings and this routine useless !

2. You left the code for Table2, but you don't use it and you removed the table from the query !?

Without having the program it would have been impossible to find the problem.
 

Attachments

  • ABSENSI_APP2.zip
    50.2 KB · Views: 174
Upvote 0

leemizu

Member
I had a look at your program.
The main problem is that you have copied the code from the Table demo program into an Activity module and try to adapt it.
In the Table.bas module you have removed all the version history, you should at least have left the last version number to know which version you are using.
I have cleaned up your project.
To load your database just one line of code is needed.
All the properties can be set in the Designer.

The problems:
1. In the demo program there is this routine: FormatNumbers(Table1, 5, 2)
It works in the demo program, but not in your case because in your database you have empty strings and this routine useless !

2. You left the code for Table2, but you don't use it and you removed the table from the query !?

Without having the program it would have been impossible to find the problem.


At first I wanted to try it like the program's demo table, but after running it I didn't know where the error was.
thank you for helping me🙂
 
Upvote 0
Top