+
+- (void)textDidEndEditing:(NSNotification *)aNotification
+{
+ wxUnusedVar(aNotification);
+ wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self );
+ if ( impl )
+ {
+ impl->DoNotifyFocusEvent( false, NULL );
+ }
+}
+@end
+
+@implementation wxNSTextView
+
+- (BOOL) becomeFirstResponder
+{
+ BOOL val = [super becomeFirstResponder];
+
+ if ( val )
+ {
+ wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( scrollView );
+ if (impl )
+ impl->DoNotifyFocusEvent( true, NULL );
+
+ }
+ return val;
+}
+
+- (void)setScrollView: (wxNSTextScrollView *) sv
+{
+ scrollView = sv;
+}
+
+- (wxNSTextScrollView*) scrollView
+{
+ return scrollView;
+}
+