[vtkusers] vtk bug? can't catch mouse button release events

wonae matt99 at hanmail.net
Thu Aug 6 22:21:25 EDT 2009


I disabled existing interactor and tried with my own interactor, but still
doesn't work.
This codes works in vtk 5.0.4, is there any difference managing interactor
between 5.0.4 and 5.4.2?


Miguel Angel Rodriguez Florido-2 wrote:
> 
> 	If I remember well, you have to define your own interactor, and disable 
> the one by default. Please, see the tutorial examples (cone's 
> examples),..it sounds me that there was one related to the interactors.
> 
> 	Sorry, I didn't try your code.
> 
> 	Hth.
> 
> wonae escribió:
>> http://www.nabble.com/file/p24818856/testVTK.zip testVTK.zip 
>> 
>> I attached very simple dialog based vtk application.
>> Please, please download it and try.
>> Why this simple application doesn't work properly with vtk 5.4.2?
>> Please try that application. :(
>> 
>> I added observer :
>> m_pvtkMFCWindow->GetInteractor()->AddObserver(vtkCommand::RightButtonReleaseEvent,
>> m_pvtkCallback);
>> 
>> And it's callback function is also simple : 
>> class vtkCallback : public vtkCommand
>> {
>> public:
>> 	static vtkCallback *New() 
>> 	{ return new vtkCallback; }
>> 
>> 	vtkCallback::vtkCallback() {};
>> 	vtkCallback::~vtkCallback() {};
>> 
>> 	virtual void Execute(vtkObject *caller, unsigned long, void*)
>> 	{
>> 		AfxMessageBox("callback");
>> 	}
>> };
>> 
>> But when I click right mouse button, message box is not shown.
>> I could see the message when I double-click my right mouse button.
>> Also it works when I press left button, and press right button, now
>> release
>> left button and finally release right button.
>> 
>> All release events of left, middle, right button don't work, and this
>> application works well with vtk 5.0.4.
>> What's different? What did I do wrong?
>> Please give me some hints.
>> Thank you in advance.
> 
> -- 
> Miguel Ángel Rodríguez Florido
> Departamento de Ingeniería Software
> División de Investigación y Desarrollo Tecnológico
> INSTITUTO TECNOLOGICO DE CANARIAS, S.A. - GOBIERNO DE CANARIAS
> URL: www.itccanarias.org Tlfno: +34 928 727548/457462, Fax: +34 928 727517
> 
> --------------------------------------------------------------------------
> AVISO LEGAL:
> Este mensaje y los ficheros adjuntos si los hubiere, se dirigen 
> exclusivamente a su destinatario y puede contener informaciÛn 
> privilegiada o confidencial. La transmisiÛn errÛnea del presente mensaje 
> en ning˙n momento supone renuncia a su confidencialidad. Si no es vd. el 
> destinatario indicado, queda notificado de que la utilizaciÛn, 
> divulgaciÛn y/o copia sin autorizaciÛn est· prohibida en virtud de la 
> legislaciÛn vigente. Si ha recibido este mensaje por error, le rogamos 
> que nos lo comunique inmediatamente por esta misma vÌa y proceda a su 
> destrucciÛn.
> 
> LEGAL WARNING:
> This message and the files attached if there were any, are intended 
> exclusively for its addressee and may contain information that is 
> CONFIDENTIAL and protected by professional privilege. A wrong 
> transmission to this message don?t suppose we relinquished to It?s 
> confidential. If you are not the intended recipient you are hereby 
> notified that any dissemination, copy or disclosure of this 
> communication is strictly prohibited by law. If this message has been 
> received in error, please immediately notify us via e-mail and delete it.
> 
> 
> 
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
> 
> 

-- 
View this message in context: http://www.nabble.com/vtk-bug--can%27t-catch-mouse-button-release-events-tp24818856p24857707.html
Sent from the VTK - Users mailing list archive at Nabble.com.




More information about the vtkusers mailing list