clickCount is not available for mouse entered/exited events also, just use respondsToSelector to make sure we catch this always, and add some stubs for mouse entered / exited events.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58890 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Kevin Ollivier
2009-02-13 20:16:13 +00:00
parent bb839504eb
commit f1f1500304

View File

@@ -190,7 +190,7 @@ void SetupMouseEvent( wxMouseEvent &wxevent , NSEvent * nsEvent )
// these parameters are not given for all events
UInt32 button = [nsEvent buttonNumber];
UInt32 clickCount = 0;
if ( eventType != NSScrollWheel )
if ( [nsEvent respondsToSelector:@selector(clickCount:)] )
[nsEvent clickCount];
wxevent.m_x = screenMouseLocation.x;
@@ -332,7 +332,11 @@ void SetupMouseEvent( wxMouseEvent &wxevent , NSEvent * nsEvent )
break ;
case NSMouseEntered :
wxevent.SetEventType( wxEVT_ENTER_WINDOW ) ;
break;
case NSMouseExited :
wxevent.SetEventType( wxEVT_LEAVE_WINDOW ) ;
break;
case NSLeftMouseDragged :
case NSRightMouseDragged :
case NSOtherMouseDragged :