in the "LinkNOE" discussion I got the following code-snippet from Tim to
bind the next of previous peak button to a key:
def nextLinkNoePeakMacro(argServer):
popup = argServer.parent.popups.get('link_noe_resonances')
if popup:
popup.nextPeak() # or .prevPeak()
And bound it to a key. While this works fine from outside the popup it
doesn't do anything if the focus is somewhere in the popup window
itself. To understand this I pasted a few print commands so that the
code looks now:
def nextLinkNoePeakMacro(argServer):
print "hello 1"
popup = argServer.parent.popups.get('link_noe_resonances')
print popup
if popup:
popup.nextPeak() # or .prevPeak()
else:
print "hello 2"
pressing the key outside the popup yields:
>>>
>>> .7486920.86185784
hello 1
from inside I get nothing at all.
It seems that the macro is never activated. testing others like 'n' from
various places it seems that shortcuts only from from within spectra and
not from other dialogues. Is there a way to change this behaviour?
confused,
Christoph
--
---------------------------------------------------------
Dr. Christoph Brockmann
Division of Structural Studies
MRC Laboratory of Molecular Biology
Hills Road
Cambridge, CB2 2QH
phone: +44-1223-40-2261 or +44-1223-40-2068
e-mail: [log in to unmask]
---------------------------------------------------------
|