示例#1
0
 def deleteAllItems(self):
     self._text_items = []
     for id in 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 == {}
示例#2
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 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
示例#3
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
示例#4
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
示例#5
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
示例#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
示例#7
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)
 def destroy(self, event=''):
     focus=root.focus_get()
     focus_parent_string=focus.winfo_parent()
     focus_parent = root.nametowidget(focus_parent_string)
     unbind_destroy(focus_parent)
     focus_parent.wm_withdraw()
     try:
         focus_parent.wm_withdraw()
     except: pass
     try:
         focus_parent.destroy()
     except: pass
示例#9
0
 def destroy(self, event=''):
     focus = root.focus_get()
     focus_parent_string = focus.winfo_parent()
     focus_parent = root.nametowidget(focus_parent_string)
     unbind_destroy(focus_parent)
     focus_parent.wm_withdraw()
     try:
         focus_parent.wm_withdraw()
     except:
         pass
     try:
         focus_parent.destroy()
     except:
         pass
示例#10
0
 def deletePreview(self, destroy=0):
     self.preview_key = -1
     # clean up the canvas
     if self.preview:
         unbind_destroy(self.preview)
         self.preview.deleteAllItems()
         ##~ if destroy:
         ##~     self.preview.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
示例#11
0
 def deletePreview(self, destroy=0):
     self.preview_key = -1
     # clean up the canvas
     if self.preview:
         unbind_destroy(self.preview)
         self.preview.deleteAllItems()
         # ~ if destroy:
         # ~     self.preview.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
示例#12
0
 def unbind_all(self):
     unbind_destroy(self.hbar)
     unbind_destroy(self.vbar)
     unbind_destroy(self.canvas)
     unbind_destroy(self.frame)
示例#13
0
 def unbind_all(self):
     unbind_destroy(self.hbar)
     unbind_destroy(self.vbar)
     unbind_destroy(self.canvas)
     unbind_destroy(self.frame)