I have a situation where I have a main window with a menu.
When a menu element is selected, a window comes up with a Treeview.
After the tree view/window has been destroyed, It then calls another function which is to launch a win which is then populated by a sqLite database, based on the returned value of the Treeview window.
(I don’t know if this is a top level issue or not)
So its Window, Menu → a command is executed calling a function which calls a window and
Win = Tk()
Menucreated and populated …
fromCommandOfMenu → menu item selected and command function called → doSomeThing
win.mainloop()
def doSomeThing()
X =- newWindow(Treeview)
(… then newWindow closes is returned)
Y = callNextNewWindow(x)
Then, return to the main menu
However, the resulting flow is quite different.
The menu becomes available, the command on the men elemtent is executed and the Window with the treeview is presented, but when the treeview/window closes (is destroyed), the control reverts back to the main window.
When the main window is then close, the function Y = callNewWindow(x) then gets executed. I do not understand why the workflow is acting in this way. It seems that the call from the function returns to the menu instead of executing the next function call to another menu.
I have many other instances where calling another window from within an existing window works without problem, but this does not. Cascading from one window through to another seems to be where the issue resides. If anyone has any thoughts or advice I would be most grateful.
I can broadly think of alternative, but cannot think if why this should not work and feel that there has to be a better solution…
I apologise if this come across a little cryptic. I am fairly new and not too bright so I would appreciate any input that could be offer from somehow more skilled or more wise than I