Android Question what's problem on this code?

khosrwb

Active Member
Licensed User
Longtime User
when I click on button1 and chenge time
then select "yes" or "no"
this error occored:

an Error has occrored in sub:main_button1_click(java line:380)
java.long.IllegalStateExeption:Interval most be than larger than 0.
continue?
 

Attachments

  • mm.zip
    7.9 KB · Views: 145
  • mm1.PNG
    mm1.PNG
    21.1 KB · Views: 132
Last edited:

DonManfred

Expert
Licensed User
Longtime User
java.long.IllegalStateExeption:Interval most be than larger than 0.
B4X:
Starter.timer1.Interval=0
is wrong... You must give the timer a higher interval
But you are using the timer wrong. You should FIRST disable the timer, then set a interval, then - if you want to run the timer - you enable the timer again.
 
Upvote 0

RandomCoder

Well-Known Member
Licensed User
Longtime User
I'm not able to check the zip file at the moment but a best guess from the error message is that you are attempting to set the interval of a timer to a value of zero or less. If you are setting a timer interval I suggest putting a log statement immediately before that line of code to show you what value is actually being set.

Nb. Manfred must have been replying at the same time as me.
 
Upvote 0
Top