Dear ROOTers,
I am not sure how to properly handle menus in a pyROOT GUI app. I attach a modified tutorial example gui_ex.py, where I’ve added 2 menus. There are two problems with this example:
- If I select File->About, I get a proper message box. However, if I later select File2->About, I still get the message box attached to File->About, instead the one attached to File2->About. The reason is, that self.MenuFile.GetCurrent() does not return None after it has been used once, and I use this to recognise which menu was selected.
- The program crashes after selecting the first menu, dismissing the message box, then selecting the second (showing the first message box) and dismissing the message box.
I would be grateful for any advise. Running on python 2.7.
gui_ex.py (3.2 KB)
ROOT Version: 6.21