def getUniq(self,req,dt): data=json.loads(dt.decode("utf-8")) if not isinstance(dt,dict) else dt if data["uniq"]=="not_yet_set": return if data["uniq"]: self.uniq=data["uniq"] Clock.unschedule(self.checkUniq) Clock.schedule_interval(self.listenMesage, 4)
def startClock(self): Clock.schedule_interval(self.checkUniq,1)
def stopListenMsg(self): self.uniq=None Clock.unschedule(self.listenMesage)
def delete_clock(self, touch): try: Clock.unschedule(touch.ud['event']) except KeyError: pass self.long_press_clock = None
def create_clock(self, touch): function = partial(self.menu, touch) self.long_press_clock = Clock.schedule_once(function, 2) touch.ud['event'] = function # So we can unschedule it if the button is pressed early
def create_clock(self, touch): function = partial(self.menu, touch) self.long_press_clock = Clock.schedule_once(function, 2) touch.ud[ 'event'] = function # So we can unschedule it if the button is pressed early