]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/cocoa/textctrl.mm
Remove now unused GetSelection from the OSX WebKit backend.
[wxWidgets.git] / src / osx / cocoa / textctrl.mm
index f8e4f22bf26c827f277fff4099ce4f323bbb35e9..b5913b841b4af809c2816cfa42b918e4d17b7de0 100644 (file)
@@ -258,7 +258,12 @@ protected :
 
 - (void) setFieldEditor:(wxNSTextFieldEditor*) editor
 {
-    fieldEditor = editor;
+    if ( editor != fieldEditor )
+    {
+        [editor retain];
+        [fieldEditor release];
+        fieldEditor = editor;
+    }
 }
 
 - (wxNSTextFieldEditor*) fieldEditor
@@ -630,7 +635,7 @@ wxNSTextFieldControl::wxNSTextFieldControl(wxWindow *wxPeer,
 
 void wxNSTextFieldControl::Init(WXWidget w)
 {
-    NSTextField wxOSX_10_6_AND_LATER(<NSTextFieldDelegate>) *tf = (NSTextField*) w;
+    NSTextField wxOSX_10_6_AND_LATER(<NSTextFieldDelegate>) *tf = (NSTextField wxOSX_10_6_AND_LATER(<NSTextFieldDelegate>)*) w;
     m_textField = tf;
     [m_textField setDelegate: tf];
     m_selStart = m_selEnd = 0;