comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: cursor return in graphics window
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: cursor return in graphics window [message #20859 is a reply to message #20851] Thu, 27 July 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Eric Williams (eric@astro.wesleyan.edu) writes:

> I am trying to use cursor to return the coordinates of a mouse click in
> a graphics window. In fact I am trying to do it twice, back to back, and
> am running in to the problem that one mouse click is being read by both
> cursor calls. I want to select two points with the mouse in the graphics
> window but since one mouse click is being read by both cursor calls I am
> getting the same coordinates for each. I have tried playing with the
> wait keyword in cursor but that doesn't seem to make a difference.
>
> Any suggestions? I am doing this on a Mac right now but have the same
> problem on my Solaris boxes.

Actually, I think your problem is that you are going through
your event handler twice on the *first* mouse click. Once
on the down event, and once on the up event. Since you weren't
anticipating this, you think you are getting the same
position from two clicks. You could modify your event
handler to look only for button DOWN events (event.type = 0).

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: help with future application
Next Topic: cursor return in graphics window

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 24 08:29:30 PDT 2025

Total time taken to generate the page: 0.79952 seconds