# See http://groups.google.com/group/wx-dev/browse_thread/thread/8af9dd06f1a1a867
# and http://svn.wxwidgets.org/viewvc/wx?view=rev&revision=61383
diff -Naur work/wxWidgets-2.9.0/src/osx/cocoa/textctrl.mm work-patched/wxWidgets-2.9.0/src/osx/cocoa/textctrl.mm
--- ../src/osx/cocoa/textctrl.mm	2009-09-04 06:53:00.000000000 +0200
+++ ../src/osx/cocoa/textctrl.mm	2009-10-02 12:49:54.000000000 +0200
@@ -141,7 +141,7 @@
 
 - (void) keyDown:(NSEvent*) event
 {
-    wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( [self delegate] );
+    wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( (WXWidget) [self delegate] );
     lastKeyDownEvent = event;
     if ( impl == NULL || !impl->DoHandleKeyEvent(event) )
         [super keyDown:event];
@@ -150,14 +150,14 @@
 
 - (void) keyUp:(NSEvent*) event
 {
-    wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( [self delegate] );
+    wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( (WXWidget) [self delegate] );
     if ( impl == NULL || !impl->DoHandleKeyEvent(event) )
         [super keyUp:event];
 }
 
 - (void) flagsChanged:(NSEvent*) event
 {
-    wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( [self delegate] );
+    wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( (WXWidget) [self delegate] );
     if ( impl == NULL || !impl->DoHandleKeyEvent(event) )
         [super flagsChanged:event];
 }
@@ -170,7 +170,7 @@
 
 - (void) insertText:(id) str
 {
-    wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( [self delegate] );
+    wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( (WXWidget) [self delegate] );
     if ( impl == NULL || lastKeyDownEvent==nil || !impl->DoHandleCharEvent(lastKeyDownEvent, str) )
     {
         [super insertText:str];

