[vtkusers] MouseMoveEvent bug in Cocoa
Benoist Laurent
laurentbenoist at hotmail.com
Mon Aug 17 14:19:58 EDT 2009
I know what a breakpoint is but I wasn't sure what you meant.
I used the well known method of the "print Hello" which is less attractive than the breakpoint method but quite rapid !!
My first observation was that the mouseMoved: method is never called.
It's quite interesting because the OnMouseMove methode of my InteractorStyle is called when you move the mouse AND click in the same time
but the mouseMoved method of the vtkCocoaGLView like I said is never called.
My vtkCocoaGLView therefore doesn't handle the device events.
Wrong.
The same "print Hello" in the keyUp method works well (idem for the other events).
So every event works except the mouseMove event ?!!
After a more specific search, a interesting link was found which explain that mouse move events are deactivated by default in Cocoa (in a performance matter).
http://serenity.uncc.edu/web/ADC/2005/Developer_DVD_Series/April/ADC%20Reference%20Library/documentation/Cocoa/Conceptual/BasicEventHandling/Tasks/HandlingMouseEvents.html
The answer is :
[window setAcceptsMouseMovedEvents:YES];
It's that simple but I've not see it elsewhere before.
Thank you very much for your help.
Best regards,
Ben
> From: sean at rogue-research.com
> To: laurentbenoist at hotmail.com; vtkusers at vtk.org
> Subject: Re: [vtkusers] MouseMoveEvent bug in Cocoa
> Date: Thu, 6 Aug 2009 10:33:07 -0400
>
> Are you asking me what a breakpoint is? If so, see:
> <http://en.wikipedia.org/wiki/Breakpoint>
>
> I'm not suggesting you modify vtkCocoaGLView.mm, I'm suggesting you
> investigate your issue by starting with a breakpoint at the beginning of
> the mouseMoved: method.
>
> Sean
>
> On 8/6/09 1:17 PM, Benoist Laurent said:
>
> >No.
> >What do you mean exactly ?
> >I should modify the code of vtkCocoaGLView.mm ?
> >
> >
> >> From: sean at rogue-research.com
> >> To: laurentbenoist at hotmail.com; vtkusers at vtk.org
> >> Subject: Re: [vtkusers] MouseMoveEvent bug in Cocoa
> >> Date: Wed, 5 Aug 2009 11:12:38 -0400
> >>
> >> On 8/5/09 2:39 PM, Benoist Laurent said:
> >>
> >> >Thank you for your answer.
> >> >I don't think that's important but actually I'm using a personnal class
> >> >which inherits from vtkInteractorStyleTrackballCamera.
> >> >I don't know if I need to do something special in the constructor of
> >> >this class.
> >> >For the moment, I just initialize the class member variables.
> >> >
> >> >So to answer your question, I tried to making my InteractorStyle
> >> >inheriting from another InteractorStyle without being successfull.
> >> >If you have any idea I take it !.
> >>
> >> Have you put a breakpoint in mouseMoved: in vtkCocoaGLView.mm?
> >>
> >> --
> >> ____________________________________________________________
> >> Sean McBride, B. Eng sean at rogue-research.com
> >> Rogue Research www.rogue-research.com
> >> Mac Software Developer Montréal, Québec, Canada
> >>
> >>
> >
> >_________________________________________________________________
> >Inédit ! Des Emoticônes Déjantées! Installez les dans votre Messenger !
> >http://www.ilovemessenger.fr/Emoticones/EmoticonesDejantees.aspx
>
>
_________________________________________________________________
Découvrez toutes les possibilités de communication avec vos proches
http://www.microsoft.com/windows/windowslive/default.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090817/098376db/attachment.htm>
More information about the vtkusers
mailing list