<br><br><div class="gmail_quote">On Thu, Nov 19, 2009 at 4:32 AM, Radu Ilinca <span dir="ltr"><<a href="mailto:radu_away_hu@yahoo.com">radu_away_hu@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<table cellpadding="0" cellspacing="0" border="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit;" valign="top">
To: <a href="mailto:vtkedge@vtkedge.orgHi" target="_blank">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>
</tbody></table><br>
<br clear="all"></blockquote><div><br>Can you provide the smallest compilable example of the problem?<br><br>Dave<br></div></div><br>