]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/textctrl.cpp
fix wxTimerEvent and wxTreeCtrl to use IMPLEMENT_DYNAMIC_CLASS macro
[wxWidgets.git] / src / osx / carbon / textctrl.cpp
index 8ae1c6b43fc740102016751e94d9944c1533200b..ee9dd86becd748071da269812aa249c2d9f99c0e 100644 (file)
@@ -509,11 +509,12 @@ void wxMacUnicodeTextControl::InstallEventHandlers()
 {
     ::InstallControlEventHandler( m_controlRef , GetwxMacUnicodeTextControlEventHandlerUPP(),
                                 GetEventTypeCount(unicodeTextControlEventList), unicodeTextControlEventList, this,
-                                NULL);
+                                (EventHandlerRef*) &m_macTextCtrlEventHandler);
 }
 
 wxMacUnicodeTextControl::~wxMacUnicodeTextControl()
 {
+    ::RemoveEventHandler((EventHandlerRef) m_macTextCtrlEventHandler);
 }
 
 void wxMacUnicodeTextControl::VisibilityChanged(bool shown)
@@ -950,7 +951,7 @@ void wxMacMLTEControl::SetBackgroundColour(const wxColour& col )
 
 static inline int wxConvertToTXN(int x)
 {
-    return wx_static_cast(int, x / 254.0 * 72 + 0.5);
+    return static_cast<int>(x / 254.0 * 72 + 0.5);
 }
 
 void wxMacMLTEControl::TXNSetAttribute( const wxTextAttr& style , long from , long to )