David Fanning's rubberband box [message #11108] |
Thu, 12 March 1998 00:00  |
nospam
Messages: 21 Registered: November 1997
|
Junior Member |
|
|
I've recently gotten David Fanning's book, and I like it quite a bit.
Good job, David! I am having a problem though with the rubberband box
code on page 117. I'm using IDL 5.0.2 on an SGI. When I am finished
drawing the rubberband box and release the mouse button, the program
does not exit the repeat loop. I have to push another button before it
will register that I've released the first button. I added the
following line just before the ENDREP:
cursor, x, y, /NoWait
ENDREP UNITL !Mouse.Button NE 1
That mostly fixed the problem, but it still seems to only work
sporadically. That is, sometimes I'll draw a box, release the button,
and it ends the loop as it is supposed to, other times it does not,
and I have to either redraw the box or push another button. This is a
problem because I was planning to use the other mouse buttons for
other things (middle button to zoom out, right button to exit the
program). This behavior persists when I run the program on the SGI
with the display on the console or on a PC (NT) with X-Win32
Thanks for the help!
scott
--
Scott Stuart
stuart at ll mit edu
|
|
|