Android Question SeekBar crash

DOM85

Active Member
Licensed User
Longtime User
Hello,
I am using a Seekbar object that crashes my app.
Every time I move the cursor of Seek01, I get the message "Unfortunately, SeekTest has stopped working"

I don't see why.
If someone can help me.
Thanks!

B4X:
#ApplicationLabel: SEEKTEST
    #VersionCode: 1
    #SupportedOrientations: unspecified
    #CanInstallToExternalStorage: False
#Region  Activity Attributes
    #FullScreen: False
    #IncludeTitle: True
#End Region

Sub Process_Globals
End Sub

Sub Globals
  Dim Seek01 As SeekBar
  Dim Label1 as Label
End Sub

Sub Activity_Create(FirstTime As Boolean)
' Seek01 and Label1 are created in Layout.bal
  Activity.LoadLayout("Layout")
  Seek01.Max = 10
  Seek01.value = 1
End Sub

Sub Seek01_ValueChanged(V As Int)
  Label1.Text = V
End Sub
 
Last edited:

DOM85

Active Member
Licensed User
Longtime User
1. The sooner you switch to B4XPages the better.
2. There must be an error message in the logs when the app crashes. Please post it.
1 - Thank you for your answer and i will soon switch to B4XPages.
2 - Here are logs when the app crash.
Thank you.

B4X:
Logger connecté à :  LGE LG-M400
--------- beginning of crash
--------- beginning of main
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
** Activity (main) Resume **
--------- beginning of system
java.lang.Exception: Sub selectionniveau_valuechanged signature does not match expected signature.
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:223)
    at anywheresoftware.b4a.BA$1.run(BA.java:360)
    at android.os.Handler.handleCallback(Handler.java:751)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:154)
    at android.app.ActivityThread.main(ActivityThread.java:6316)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:872)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:762)
 
Upvote 0

teddybear

Well-Known Member
Licensed User
B4X:
Sub Seek01_ValueChanged(V As Int)
  Label1.Text = V
End Sub
The log told you the Seek01_ValueChanged signature does not match expected signature
it looks like this
B4X:
Sub Seek01_ValueChanged(V As Int, UserChanged As Boolean)

  Label1.Text = V

End Sub
 
Upvote 1

DOM85

Active Member
Licensed User
Longtime User
The log told you the Seek01_ValueChanged signature does not match expected signature
it looks like this
B4X:
Sub Seek01_ValueChanged(V As Int, UserChanged As Boolean)

  Label1.Text = V

End Sub
Perfect !
A great thank to you !!!!!
 
Upvote 0
Top