Apropos of creating and deleting Tk windows, I wonder about the main program that calls your "guiStart" sub. Does this sub get called numerous times during the execution of the main script? Or is it rather the case that the main script does some stuff, calls this sub, does a few other things after the gui shuts down, then exits?
If this gui comes up numerous times (for that matter, if the dialog box comes up numerous times), you might consider restructuring the app so that the windows/widgets are all created just once, then made to appear, disappear and reappear as needed, without destroying and recreating them.
Creating and destroying widgets involves a lot of extra work; it might not be a problem now, but if you have a larger app with more widgets or more data being displayed in widgets, it can slow things down noticeably. Meanwhile, reconfiguring widgets to be visible or not visible, or changing the data that they display, is relatively fast. | [reply] |
That sounds like a good idea. I would need to figure out how to create them and then pass them around. Thanks for the advice.
| [reply] |