def testCocoaPlaylistUpDown(): # keyCode: 125 - down / 126 - up obj = cocoaGetPlaylistObj() utils.do_in_mainthread( lambda: obj.keyDown_(createCocoaKeyEvent(125, True)), wait=True) utils.do_in_mainthread( lambda: obj.keyDown_(createCocoaKeyEvent(126, True)), wait=True)
def updateSubjectObject(self): if self.parent: self.subjectObject = self.attr.__get__(self.parent.subjectObject) if getattr(self.subjectObject, "_updateEvent", None): self._updateHandler = lambda: do_in_mainthread(self.updateContent, wait=False) getattr(self.subjectObject, "_updateEvent").register(self._updateHandler)
def hangMainThread(secs): import utils, time utils.do_in_mainthread(lambda: time.sleep(secs), True)
def testCocoaPlaylistUpDown(): # keyCode: 125 - down / 126 - up obj = cocoaGetPlaylistObj() utils.do_in_mainthread(lambda: obj.keyDown_(createCocoaKeyEvent(125,True)), wait=True) utils.do_in_mainthread(lambda: obj.keyDown_(createCocoaKeyEvent(126,True)), wait=True)
def controlUpdateHandler(control=control): do_in_mainthread(lambda: self.updateChild(control), wait=False)