Example #1
0
 def destroy(self):
     after_cancel(self.timer)
     unbind_destroy(self.top)
     try:
         self.top.wm_withdraw()
     except:
         if traceback:
             traceback.print_exc()
         pass
     try:
         self.top.destroy()
     except:
         if traceback:
             traceback.print_exc()
         pass
     # destruct(self.top)
     if 1 and self.parent:  # ???
         try:
             # self.parent.update_idletasks()
             # FIXME: why do we need this under Windows ?
             if hasattr(self.parent, "busyUpdate"):
                 self.parent.busyUpdate()
             else:
                 self.parent.update()
         except:
             if traceback:
                 traceback.print_exc()
             pass
     self.top = None
     self.parent = None
Example #2
0
 def deleteAllItems(self):
     self._text_items = []
     for id in list(self.items.keys()):
         assert id not in self.__tiles  # because the tile is created by id
         unbind_destroy(self.items[id])
         self.items[id].delete()
     assert self.items == {}
Example #3
0
 def destroy(self):
     after_cancel(self.timer)
     unbind_destroy(self.top)
     self.top.destroy()
     self.top.update_idletasks()
     self.top = None
     self.parent = None
Example #4
0
 def deleteAllItems(self):
     self._text_items = []
     for id in list(self.items.keys()):
         assert id not in self.__tiles   # because the tile is created by id
         unbind_destroy(self.items[id])
         self.items[id].delete()
     assert self.items == {}
Example #5
0
 def destroy(self):
     after_cancel(self.timer)
     unbind_destroy(self.top)
     try:
         self.top.wm_withdraw()
     except Exception:
         if traceback:
             traceback.print_exc()
         pass
     try:
         self.top.destroy()
     except Exception:
         if traceback:
             traceback.print_exc()
         pass
     # destruct(self.top)
     if 1 and self.parent:  # ???
         try:
             # self.parent.update_idletasks()
             # FIXME: why do we need this under Windows ?
             if hasattr(self.parent, "busyUpdate"):
                 self.parent.busyUpdate()
             else:
                 self.parent.update()
         except Exception:
             if traceback:
                 traceback.print_exc()
             pass
     self.top = None
     self.parent = None
Example #6
0
 def destroy(self, *event):
     unbind_destroy(self.parent)
     try:
         self.parent.wm_withdraw()
     except: pass
     try:
         self.parent.destroy()
     except: pass
     self.parent = None
Example #7
0
 def destroy(self, *event):
     unbind_destroy(self.parent)
     try:
         self.parent.wm_withdraw()
     except: pass
     try:
         self.parent.destroy()
     except: pass
     self.parent = None
Example #8
0
 def destroy(self, *args):
     for group in self.groups:
         unbind_destroy(group)
     unbind_destroy(self)
     if self.timer:
         after_cancel(self.timer)
         self.timer = None
     self.wm_withdraw()
     if self.highlight_items:
         for i in self.highlight_items:
             i.delete()
     tkinter.Toplevel.destroy(self)
Example #9
0
 def destroy(self, *args):
     for l in self.groups:
         unbind_destroy(l)
     unbind_destroy(self)
     if self.timer:
         after_cancel(self.timer)
         self.timer = None
     self.wm_withdraw()
     if self.highlight_items:
         for i in self.highlight_items:
             i.delete()
     Tkinter.Toplevel.destroy(self)
Example #10
0
 def deletePreview(self, destroy=0):
     self.preview_key = -1
     # clean up the canvas
     if self.preview:
         unbind_destroy(self.preview.canvas)
         self.preview.canvas.deleteAllItems()
         if destroy:
             self.preview.canvas.delete("all")
     #
     #for l in self.info_labels.values():
     #    l.config(text='')
     # destruct the game
     if self.preview_game:
         self.preview_game.endGame()
         self.preview_game.destruct()
         destruct(self.preview_game)
     self.preview_game = None
     # destruct the app
     if destroy:
         if self.preview_app:
             destruct(self.preview_app)
         self.preview_app = None
Example #11
0
 def deletePreview(self, destroy=0):
     self.preview_key = -1
     # clean up the canvas
     if self.preview:
         unbind_destroy(self.preview.canvas)
         self.preview.canvas.deleteAllItems()
         if destroy:
             self.preview.canvas.delete("all")
     #
     # for l in self.info_labels.values():
     #    l.config(text='')
     # destruct the game
     if self.preview_game:
         self.preview_game.endGame()
         self.preview_game.destruct()
         destruct(self.preview_game)
     self.preview_game = None
     # destruct the app
     if destroy:
         if self.preview_app:
             destruct(self.preview_app)
         self.preview_app = None
Example #12
0
 def unbind_all(self):
     unbind_destroy(self.hbar)
     unbind_destroy(self.vbar)
     unbind_destroy(self.canvas)
     unbind_destroy(self.frame)
Example #13
0
 def unbind_all(self):
     unbind_destroy(self.hbar)
     unbind_destroy(self.vbar)
     unbind_destroy(self.canvas)
     unbind_destroy(self.frame)