My software notes

November 2, 2007

NMRView NvJ 8.0a7 now available (solves Leopard arrow key problem)

Filed under: NMRPipe and NMRview — kpwu @ 1:02 pm

Bruce Johnson just released the latest version of NMRViewJ.

— original message in the mailing list—–

Some Leopard users have noted that the Up/Down/Left/Right  keys no
longer work for moving up down planes in 3D/4D spectra.

This is now fixed in nvjinstall8_0_a7.jar

Note this should also fix a  similar problem that users of non-
English localized version operating systems.

For script writers, here is why this broke:

When you setup key bindings you can give a “%K” argument for the
script that will be executed.  For example,

bind Spectrum <Down> “NvNavigate %W %K”

When you click the down arrow key in a window the NvNavigate
procedure will receive two arguments, the name of the window (from
the %W arg) and the text associated with the key you pressed.  In
previous Mac versions (and other operating systems) pressing the Down
key would send the string “Down”.  In Mac OS 10.5, this key now sends
the Unicode character that corresponds to a down arrow (and similarly
for Up, Left and Right).  In the NvNavigate code, I explicitly test
what key has been pressed by looking for the text Up, Down, Left or
Right.  This test now fails because the argument is the unicode
character (not the corresponding words).

I’ve fixed this by changing the bindings to:

bind Spectrum <Down> “NvNavigate %W Down”

This should also fix the problem if you’re using, for example, a
French localized operating system.

I haven’t had much time to look for other Leopard problems.  The only
other thing I’ve noticed is that by default the Middle Mouse button
is set to activate Dashboard.  You can turn this off in the Expose/
Spaces system preferences dialog.

cheers,

Bruce

Blog at WordPress.com.