>Hello,
>
>We're puzzled by this one. goto_menu is a Tkinter Menu so should have a
>"state" option. So since it seems not to have one it must have been
>whacked somehow. If, at the Python prompt you do:
>
>>>> w = top.getWindowPopup(name='myWindow') # myWindow = window name
>>>> d = w.scrolled_window.menu.submenuDict
>>>> d['Navigate']
><memops.gui.Menu.Menu instance at 0x4134f9ac>
>
>you should get something like the above, i.e. it should be a
>memops.gui.Menu.Menu instance, which is a subclass of Tkinter.Menu. If it
>says it is a memops.gui.Menu.Menu instance then we would seem to be in a
>funny situation where it wasn't properly initialised somehow. But the
>menu initialisation is pretty bog standard, and if the goto isn't working
>I wouldn't have thought that most of them were working (most have similar
>state settings).
When I do in the python window what you suggested, I get:
CCPNMR Analysis Version 1.0. Release 3 (Copyright 2003-2004 CCPN)
Distribution created Thu Jun 9 08:13:59 2005
>>> w = top.getWindowPopup(name='myWindow') # myWindow = window name
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: getWindowPopup() got an unexpected keyword argument 'name'
>>> d = w.scrolled_window.menu.submenuDict
Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: name 'w' is not defined
>>> d['Navigate']
Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: name 'd' is not defined
>>>
>And we weren't too sure what you meant by the last bit (and that's
>probably a crucial clue as to what is going on above). When you say the y
>coordinate is not available do you mean that in the "Edit Assignment"
>dialog you cannot set the y assignment to being a (new) resonance?
The "Edit Assignment" popup does not show a "New" for the F2 resonance at all.
Furthermore, the first time I click on a peak to assign it, everything works
correctly. I get the error message whenever I right mouse click subsequently
anywhere within the spectrum window. With peaks previously given either
F1 and F2 resonance numbers, or assignments, the "Edit Assignment" popup shows
both shifts with resonance numbers (or assignments if they exist). With previously
unassigned peaks, only one of the two coordinates, usually F2, will shows a "New".
Just now I have seen some cases in which the F1 coordinate did not show a "New" and the
F2 coordinate showed the "New".
The error that appears upon right mouse click anywhere in the spectrum window is
always the same:
>>> Exception in Tkinter callback
Traceback (most recent call last):
File "/sw/src/root-python23-2.3.3-23/sw/lib/python2.3/lib-tk/Tkinter.py", line 1345, in __call__
return self.func(*args)
File "/ccpnmr/ccpnmr1.0/python/ccpnmr/analysis/WindowPopup.py", line 1071, in updateMenuState
goto_menu.entryconfig(0, state=state)
File "/sw/src/root-python23-2.3.3-23/sw/lib/python2.3/lib-tk/Tkinter.py", line 2574, in entryconfigure
return self._configure(('entryconfigure', index), cnf, kw)
File "/sw/src/root-python23-2.3.3-23/sw/lib/python2.3/lib-tk/Tkinter.py", line 1130, in _configure
self.tk.call(_flatten((self._w, cmd)) + self._options(cnf))
TclError: unknown option "-state"
Could this be from the placement of the transposes code added to the Navigate
Option section?
I note in passing that in analysis 1.02, the windowZplanes assignment line in the
Navigate Option secton read:
windowZplanes = Util.findOrthogonalWindows(self.window,
self.findPosition(x,y,col,returnDict=False))
but in analysis 1.03 this was changed to read:
cursorPosition = self.findPosition(x,y,col,returnDict=False)
windowZplanes = findOrthogonalWindows(self.window, cursorPosition)
Should it be Util.findOrthogonalWindows(self.window, cursorPosition) instead?
Sincerely,
--
Bruce D. Ray, Ph.D.
Associate Scientist, and Operations Director
NMR Center
IUPUI
Physics Dept.
402 N. Blackford St.
Indianapolis, IN 46202-3273
|