[vtkusers] vtkCommand::AnyEvent

A J lost_bits1110 at hotmail.com
Tue Jun 1 16:05:16 EDT 2004


Hi experts,

Is there any reason why my Observer won't detect the event I specify? The 
only one that works is vtkCommand::AnyEvent
but if I try any others like EnterEvent, or KeyPressEvent or 
MouseMoveEvent... nothing happens

Thank you in advance vtkusers!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Okay so below is generally what my code looks like, its very simple:

----------------
vtkCallbackCommand *cbc = vtkCallbackCommand::New();
cbc->SetCallback( MyClass::DoStuff );
Iren->AddObserver( vtkCommand::AnyEvent, cbc );  //won't work for 
EnterEvent?

MyClass::RenderIt()
{
        while(1)
        {
              if (flag == 0)
              {
                            SomeFunction();
                            Iren->Render();
              }
              else
              {
                            SomeOtherFunction();
                            Iren->Render();
              }
        }
}

MyClass::DoStuff()
{
   cout<<"event detected"<<endl;
   flag = !flag;
}

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar – get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/




More information about the vtkusers mailing list