classification
Title: warn user of creation of multiple Tk instances
Type: behavior Stage:
Components: Tkinter Versions:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: mps, serhiy.storchaka
Priority: normal Keywords:

Created on 2018-02-12 10:14 by mps, last changed 2018-03-15 08:45 by serhiy.storchaka.

Messages (2)
msg312036 - (view) Author: (mps) Date: 2018-02-12 10:14
tkinter is the first GUI interface used by novices. 
They often get in trouble when they create a new Tk instance instead of a Toplevel.
It would be helpful to output a warning message in this case (i.e. checking _default_root is not None and _support_default_root is True in the Tk initialization).
Thank for your attention and best regards.

- mps.
msg313860 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-03-15 08:45
A warning will harm users that create multiple Tk instances intentionally. If it would be always bad, it should raise an error instead of a warning.
History
Date User Action Args
2018-03-15 08:45:48serhiy.storchakasetmessages: + msg313860
2018-02-16 20:47:09terry.reedysetnosy: + serhiy.storchaka
2018-02-12 10:14:02mpscreate