Clock event not triggering the label

Hello. I would like my label_for_status to change accordingly based when both the textbox_show_time and show_saved_time_textbox matches.

I retrieved the timing of the show_saved_time from TinyDB. I then let the clock run (time displayed inside textbox_show_time) and when the values in both textboxes matches, the label still did not change from Timer is waiting to Timer is working

Below are my blocks for the label triggering event

How do you fill the show_saved_time.Text field?

use Do it to debug your blocks, see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
see also Live Development, Testing, and Debugging Tools

Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

There is another screen that I will manually typed in the time that I want to save inside a textbox. Then I saved that information into TinyDB and close that screen. I open up a new screen that contain the above code. And when this new screen opens up, the value that I manually typed in is reflected inside a textbox.

This is a problem if you are doing exact text matching later.
Instead of typing in the time, consider using a Time Picker (Date Picker?) component, and formatting the resulting Instant to exactly the same standard used for the later comparison.

Also, exact matching is very stringent.
What if you overshoot the time?

I think in the unlikely event you get the 2 times to match exactly, the new Label Text "Timer is working" will only be displayed for 1 clock tick, whatever duration that may be set to.
Then it will be changed back to "Timer is waiting" as the If condition is now false.

To test your logic maybe try changing the compared values in the if statement to something simple like a number 1 etc to show that logic is working. And disable the "Timer is waiting" setter so the change in label will remain unchanged once the values are matched . Or disable the clock when a match is made.

Thanks @Aussie_L for the suggestion. I actually used @ABG method of using a timepicker. Then I used the saved timepicker value to compare with the clock timing. It worked!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.