- s->AddMouseClickCommand( Self::_Click, this );
- s->AddMouseDoubleClickCommand( Self::_DoubleClick, this );
+ TBaseStyle* s =
+ dynamic_cast< TBaseStyle* >( rwi->GetInteractorStyle( ) );
+ if( s != NULL )
+ {
+ s->AddMouseClickCommand( Self::_Click, this );
+ s->AddMouseDoubleClickCommand( Self::_DoubleClick, this );
+
+ } // fi