def resize(self): try: self.lines = format_tb(self.W - 1, self.traceback_) self.area = ScrollArea(self.H, len(self.lines), 0) self.draw() except: logger.critical(traceback.format_exc())
def populate(self): """[Re]create the scroll area if needed. In order to retain the current page and selection, we only recreate the pane if its size parameters have changed. """ args = { 'numrows': self.c1[0] + 1, 'numitems': len(self.summary), 'toprow': self.toprows } if not self.listing: self.listing = ScrollArea(**args) else: for k, v in args.items(): if getattr(self.listing, k) != v: self.listing = ScrollArea(**args) break
def populate_result(self): """[Re]create just the result ScrollArea. """ if self.selected == '': curresult = () else: traceback_ = self.detail.data[self.selected][1] self.curresult = format_tb(self.c2[1], traceback_) self.result = ScrollArea( self.c1[0]+1 , len(self.curresult) , self.toprows )
def populate(self): """[Re]create both ScrollAreas. In order to retain the current page and selection, we only recreate the tests pane if the parameters of this area have changed. """ args = { 'numrows': self.c1[0]+1 , 'numitems':len(self.detail) , 'toprow': self.toprows } if not self.tests: self.tests = ScrollArea(**args) else: for k,v in args.items(): if getattr(self.tests, k) != v: self.tests = ScrollArea(**args) break self.populate_result()
def setUp(self): self.area = ScrollArea(20, 50, 0) self.area.refuse = refuse_raise
def setUp(self): self.area = ScrollArea(4, 5, 3) self.area.refuse = refuse_raise
def setUp(self): self.area = ScrollArea(20, 10, 3) self.area.refuse = refuse_pass
def setUp(self): #wheeee! self.area = ScrollArea(20, 50, 3) self.area.refuse = refuse_pass