@classmethod
def tearDownClass(cls):
cls.root.update_idletasks()
-## for id in cls.root.tk.call('after', 'info'):
+## for id in cls.root.after_info():
## cls.root.after_cancel(id) # Need for EditorWindow.
cls.root.destroy()
del cls.root
timer = self.cc.t1 = self.text.after(10000, lambda: None)
self.cc.__del__()
with self.assertRaises(TclError) as cm:
- self.root.tk.call('after', 'info', timer)
+ self.root.after_info(timer)
self.assertIn("doesn't exist", str(cm.exception))
def test_reload(self):
eq(cc.context['bg'], self.highlight_cfg['background'])
eq(cc.context.get('1.0', 'end-1c'), '')
eq(cc.editwin.label, 'Hide Code Context')
- eq(self.root.tk.call('after', 'info', self.cc.t1)[1], 'timer')
+ eq(self.root.after_info(self.cc.t1)[1], 'timer')
# Toggle off.
toggle()
# Colorizing already scheduled.
save_id = color.after_id
- eq(self.root.tk.call('after', 'info', save_id)[1], 'timer')
+ eq(self.root.after_info(save_id)[1], 'timer')
self.assertFalse(color.colorizing)
self.assertFalse(color.stop_colorizing)
self.assertTrue(color.allow_colorizing)
color.notify_range('1.0', '1.0+3c')
self.assertTrue(color.stop_colorizing)
self.assertIsNotNone(color.after_id)
- eq(self.root.tk.call('after', 'info', color.after_id)[1], 'timer')
+ eq(self.root.after_info(color.after_id)[1], 'timer')
# New event scheduled.
self.assertNotEqual(color.after_id, save_id)
self.assertFalse(color.colorizing)
self.assertFalse(color.stop_colorizing)
self.assertTrue(color.allow_colorizing)
- eq(self.root.tk.call('after', 'info', color.after_id)[1], 'timer')
+ eq(self.root.after_info(color.after_id)[1], 'timer')
# Toggle colorizing off.
color.toggle_colorize_event()
# Toggle on while colorizing not in progress.
color.colorizing = False
color.toggle_colorize_event()
- eq(self.root.tk.call('after', 'info', color.after_id)[1], 'timer')
+ eq(self.root.after_info(color.after_id)[1], 'timer')
self.assertFalse(color.colorizing)
self.assertTrue(color.stop_colorizing)
self.assertTrue(color.allow_colorizing)
mock_recmain.assert_called()
eq(mock_recmain.call_count, 1)
# Rescheduled when TODO tag still exists.
- eq(self.root.tk.call('after', 'info', color.after_id)[1], 'timer')
+ eq(self.root.after_info(color.after_id)[1], 'timer')
# No changes to text, so no scheduling added.
text.tag_remove('TODO', '1.0', 'end')
@classmethod
def tearDownClass(cls):
cls.root.update_idletasks()
- for id in cls.root.tk.call('after', 'info'):
+ for id in cls.root.after_info():
cls.root.after_cancel(id)
cls.root.destroy()
del cls.root
cls.window._close()
del cls.window
cls.root.update_idletasks()
- for id in cls.root.tk.call('after', 'info'):
+ for id in cls.root.after_info():
cls.root.after_cancel(id)
cls.root.destroy()
del cls.root
cls.window._close()
del cls.window
cls.root.update_idletasks()
- for id in cls.root.tk.call('after', 'info'):
+ for id in cls.root.after_info():
cls.root.after_cancel(id)
cls.root.destroy()
del cls.root
@classmethod
def tearDownClass(cls):
cls.root.update_idletasks()
- for id in cls.root.tk.call('after', 'info'):
+ for id in cls.root.after_info():
cls.root.after_cancel(id)
cls.root.destroy()
del cls.root
cls.editwin._close()
del cls.editwin
cls.root.update_idletasks()
- for id in cls.root.tk.call('after', 'info'):
+ for id in cls.root.after_info():
cls.root.after_cancel(id) # Need for EditorWindow.
cls.root.destroy()
del cls.root
def tearDownClass(cls):
del cls.mc
cls.root.update_idletasks()
-## for id in cls.root.tk.call('after', 'info'):
+## for id in cls.root.after_info():
## cls.root.after_cancel(id) # Need for EditorWindow.
cls.root.destroy()
del cls.root
@classmethod
def tearDownClass(cls):
#cls.root.update_idletasks()
-## for id in cls.root.tk.call('after', 'info'):
+## for id in cls.root.after_info():
## cls.root.after_cancel(id) # Need for EditorWindow.
cls.root.destroy()
del cls.root
@classmethod
def tearDownClass(cls):
cls.root.update_idletasks()
- for id in cls.root.tk.call('after', 'info'):
+ for id in cls.root.after_info():
cls.root.after_cancel(id) # Need for EditorWindow.
cls.root.destroy()
del cls.root
def tearDownClass(cls):
cls.root.update_idletasks()
-## for id in cls.root.tk.call('after', 'info'):
+## for id in cls.root.after_info():
## cls.root.after_cancel(id) # Need for EditorWindow.
cls.root.destroy()
del cls.root
def tearDownClass(cls):
window.registry = window.WindowList()
cls.root.update_idletasks()
-## for id in cls.root.tk.call('after', 'info'):
+## for id in cls.root.after_info():
## cls.root.after_cancel(id) # Need for EditorWindow.
cls.root.destroy()
del cls.root
def tearDownClass(cls):
cls.editwin._close()
cls.root.update_idletasks()
- for id in cls.root.tk.call('after', 'info'):
+ for id in cls.root.after_info():
cls.root.after_cancel(id) # Need for EditorWindow.
cls.root.destroy()
del cls.root
zzdummy.idleConf.userCfg = usercfg
del cls.editor, cls.text
cls.root.update_idletasks()
- for id in cls.root.tk.call('after', 'info'):
+ for id in cls.root.after_info():
cls.root.after_cancel(id) # Need for EditorWindow.
cls.root.destroy()
del cls.root
_tk_type = "xquartz"
elif 'aqua' not in ws:
_tk_type = "other"
- elif 'AppKit' in root.tk.call('winfo', 'server', '.'):
+ elif 'AppKit' in root.winfo_server():
_tk_type = "cocoa"
else:
_tk_type = "carbon"
# the Turtle window will show behind the Terminal window when you
# start the demo from the command line.
rootwindow = cv.winfo_toplevel()
- rootwindow.call('wm', 'attributes', '.', '-topmost', '1')
- rootwindow.call('wm', 'attributes', '.', '-topmost', '0')
+ rootwindow.wm_attributes(topmost=True)
+ rootwindow.wm_attributes(topmost=False)
def clear(self):
"""Delete all drawings and all turtles from the TurtleScreen.