<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">To: <A href="mailto:vtkedge@vtkedge.orgHi">vtkedge@vtkedge.orgHi</A> all ! <BR> <BR>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:<BR> <BR>class vtkMyCallback : public vtkCommand {<BR>public: static vtkMyCallback *New() { return new vtkMyCallback; }<BR>virtual void Execute( vtkObject *caller, unsigned long, void*) {<BR>vtkRenderer *ren = reinterpret_cast<vtkRenderer*> (caller);<BR>cout << "ana are mere " << endl;<BR>}<BR>}; <BR> <BR> <BR>... in the main () i have:<BR> <BR>vtkMyCallback *mycallback = vtkMyCallback::New(); <BR>ren1->AddObserver(vtkCommand::LeftButtonPressEvent, mycallback);<BR> <BR>I am
using Visual Studio 2008 and WinXP<BR> <BR> <BR>The problem is that, I don't catch the event and actually the code never enters the Execute function. Could someone tell me why ?<BR> <BR>Best,<BR>Radu. <BR></td></tr></table><br>