Hello,
It's a bit worrying all these bad widgets we seem to be getting. That one
in particular is worrying because it is one of the top-level ones (so a
popup), given that the (not very helpful) widget name is only 2 numbers
long (the other ones we've seen recently are 6 or 7 long, so far down the
hierarchy). I opened (pretty much) every popup in a project to see if I
could reproduce but no luck.
The Save dialog saves the popup locations (and whether they are open) and
that was where it was going wrong, because one of the popups was no longer
valid for some reason, so interrogating it fell over.
The reason the Save As didn't generate this is because it wasn't making
that call to remember the locations. Well, it probably should be so I've
added that in now. But hopefully I've also protected against these bum
popups, and instead a warning message should printed to the screen (if
TclError is a subclass of the Python Exception class, I hope it is).
I've also added some code now so that if you do "Save As" then the popup
titles are changed to reflect the new project name (if it has changed)
rather than the old one. (A technical point: this only applies to popups
that are set up in the main bit of code, so the odd popup might have its
title not updated.)
Wayne
On Wed, 10 Mar 2010, Patrick van der Wel wrote:
> Hi,
>
> I got another exception to report, below. This seems to be correlated to
> trying to save the project. Saving did not seem to complete and I could
> not exit the program (at least it kept popping up the 'Save project?'
> popup anytime I tried to exit (while giving that error in the
> background, unnoticed).
>
> Interestingly, I did manage to save and exit after I did a 'save as',
> which worked fine...
>
> Patrick
>
> PS. Here is the error message:
>
> Exception in Tkinter callback
> Traceback (most recent call last):
> File "ccpnmr/python2.5/lib/python2.5/lib-tk/Tkinter.py", line 1403, in __call__
> return self.func(*args)
> File "/opt/ccpnmr/ccpnmr2.1/python/ccpnmr/analysis/AnalysisPopup.py", line 1999, in saveProject
> self.saveFile()
> File "/opt/ccpnmr/ccpnmr2.1/python/ccpnmr/analysis/AnalysisPopup.py", line 2208, in saveFile
> self.setPopupsOpen()
> File "/opt/ccpnmr/ccpnmr2.1/python/ccpnmr/analysis/AnalysisPopup.py", line 2190, in setPopupsOpen
> if popup.state() == 'normal' and not key.startswith(window_popup_prefix): # bit of a hack
> File "ccpnmr/python2.5/lib/python2.5/lib-tk/Tkinter.py", line 1594, in wm_state
> return self.tk.call('wm', 'state', self._w, newstate)
> TclError: bad window path name ".78196864.192250824"
>
|