• @ccb_2k18 sorry to answer so late but there is a time zone difference😇
    I've seen you posted the same question in another topic and you are right.
    Don't ask a question to only one person, and surely me, there are in this forum a lot of marvelous people, and often a lot smarter than me.

  • Thx. Gonna see if I can get it to work

  • In the line that is failing, sender is a ui.Button but you have defined CountDown as a standalone function, not as a method of ui.Button().

    Try CountDown(sender) instead of sender.CountDown()

    Also code format requires the three backticks are on a line by themselves with no other text before or after them on the same line.

  • Thank you mikael and JonB for the help.

    @JonB said:

    You sure you have update_interval set?

    Yes. I have:

    self.update_interval = 1.0

    in my derived class's __init__ method.

    It likely I did something to break code that was working, but I don't see anything wrong. I'll debug my application - if this works for others, then I'm sure I introduced a bug somewhere. It's odd though, because I only made two very small changes and then updated the OS.

    Next time, before I upgrade the OS, I'll test before to make sure it's the OS that breaks code, and not my code changes.

  • Thank you so much for the example! I'll take a look and see what I can understand from it.

  • @JonB , revised version of the test code. is a lot of extra just for testing. But so clean now for the timer part. Also a lot more accurate timings . Thanks again

    import ui import datetime, time class Test (ui.View): def __init__(self, duration = 1.0): self.frame = (0,0,300,300) self.background_color = 'white' btn = ui.Button(title = 'start') btn.width = 100 btn.border_width = .5 # hmmmmmmm, center does not work ( as you would expect it too ) # eg. btn.center = self.center btn.center = (self.center[0], self.center[1] - (44/2)) btn.action = self.JonB_way self.fire_obj = btn self.add_subview(btn) self.auto_close_duration = float(duration) self.start = None def JonB_way(self, sender): self.fire_obj.enabled = False self.start = datetime.datetime.now() ui.delay(self.fire_delay, self.auto_close_duration) def fire_delay(self): self.name = str(datetime.datetime.now() - self.start) self.fire_obj.enabled = True
Internal error.

Oops! Looks like something went wrong!