Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] MouseListeners

Thanks for that. 

I didn't change my code, but placed the flag in a controller class that both
mouseMove and mouseDown accessed to set and get the flag value, which works
perfectly. It would be interesting to know why though.

I had a look at the code snipet at the URL below. My implementation is somewhat
different. In case anyone is interested, I created a MouseListner that implemented
both MouseMoveListener and MouseListener, and added it to the composite accordingly
(composite.addMouseMoveListener() and composite.addMouseListener()). 

Either way, it's working now. Thanks again,

Regards,
Anthony Bennis.

>You are probably doing something simple wrong in your code.  Try hacking 
>this snippet to see if you get the events.
>
>http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/snippits/snippet62.html

>
>
>
>
>
>"Anthony Bennis" <anthonybennis@xxxxxxxxxxxxx>
>Sent by: platform-swt-dev-admin@xxxxxxxxxxx
>01/19/2004 09:12 AM
>Please respond to platform-swt-dev
> 
>        To:     platform-swt-dev@xxxxxxxxxxx
>        cc: 
>        Subject:        [platform-swt-dev] MouseListeners
>
>
>Hi,
>
>I need to listen to two mouse events Simultaneously: MouseMove and 
>MouseDown,
>in order to trigger an event.
>
>I've added the MouseMoveListener and MouseListener to the composite, and 
>added
>a flag to the MouseDown listener, which I check for in the MouseMove 
>event.
>
>
>However, this does not work correctly. The flag is changed on MouseDown, 
>but
>it's new value is not read in the MouseMove event. Is there a better way 
>to
>listen for these two events? 
>
>Regards,
>Anthony Bennis.
>
>*************************** ADVERTISEMENT ******************************
>Get 100 Free Mapping Credits from IOL Mapping! All new site and new
>features. Log on for your Free Credits! maps.IOL.ie
>_______________________________________________
>platform-swt-dev mailing list
>platform-swt-dev@xxxxxxxxxxx
>http://dev.eclipse.org/mailman/listinfo/platform-swt-dev
>
>
>_______________________________________________
>platform-swt-dev mailing list
>platform-swt-dev@xxxxxxxxxxx
>http://dev.eclipse.org/mailman/listinfo/platform-swt-dev
>
>

*************************** ADVERTISEMENT ******************************
Get 100 Free Mapping Credits from IOL Mapping! All new site and new
features. Log on for your Free Credits! maps.IOL.ie


Back to the top