Hi all ! 
 
I am trying to catch the LeftButtonPressEvent event using the observer/commannd 
architecture.  Code is pretty simmilar to the one in the book where it catches 
the StartEvent (and the code works) but i try the LeftButtonPressEvent.  Code 
below:
 
class vtkMyCallback : public vtkCommand {
public: static vtkMyCallback *New() { return new vtkMyCallback; }
virtual void Execute( vtkObject *caller, unsigned long, void*) {
vtkRenderer *ren = reinterpret_cast<vtkRenderer*> (caller);
cout << "ana are mere " << endl;
}
}; 
 
 
... in the main ()  i have:
 
vtkMyCallback *mycallback = vtkMyCallback::New(); 
ren1->AddObserver(vtkCommand::LeftButtonPressEvent, mycallback);
 
I am using Visual Studio 2008 and WinXP
 
 
The problem is that, I don't catch the event and actually the code never enters 
the Execute function. Could someone tell me why ?
 
Best,
Radu.


      
_______________________________________________
VtkEdge mailing list
[email protected]
http://public.kitware.com/cgi-bin/mailman/listinfo/vtkedge

Reply via email to