# 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
|
|
|
141 | 141 | |
142 | 142 | - (void) keyDown:(NSEvent*) event |
143 | 143 | { |
144 | | wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( [self delegate] ); |
| 144 | wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( (WXWidget) [self delegate] ); |
145 | 145 | lastKeyDownEvent = event; |
146 | 146 | if ( impl == NULL || !impl->DoHandleKeyEvent(event) ) |
147 | 147 | [super keyDown:event]; |
… |
… |
|
150 | 150 | |
151 | 151 | - (void) keyUp:(NSEvent*) event |
152 | 152 | { |
153 | | wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( [self delegate] ); |
| 153 | wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( (WXWidget) [self delegate] ); |
154 | 154 | if ( impl == NULL || !impl->DoHandleKeyEvent(event) ) |
155 | 155 | [super keyUp:event]; |
156 | 156 | } |
157 | 157 | |
158 | 158 | - (void) flagsChanged:(NSEvent*) event |
159 | 159 | { |
160 | | wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( [self delegate] ); |
| 160 | wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( (WXWidget) [self delegate] ); |
161 | 161 | if ( impl == NULL || !impl->DoHandleKeyEvent(event) ) |
162 | 162 | [super flagsChanged:event]; |
163 | 163 | } |
… |
… |
|
170 | 170 | |
171 | 171 | - (void) insertText:(id) str |
172 | 172 | { |
173 | | wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( [self delegate] ); |
| 173 | wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( (WXWidget) [self delegate] ); |
174 | 174 | if ( impl == NULL || lastKeyDownEvent==nil || !impl->DoHandleCharEvent(lastKeyDownEvent, str) ) |
175 | 175 | { |
176 | 176 | [super insertText:str]; |