]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/listbox.cpp
notify the event loop that synthesized events are on the queue, wait for them to...
[wxWidgets.git] / src / osx / carbon / listbox.cpp
index 2ee41be25e0e3a23bbf7310b6eeb8d6c17ab9f91..32a312ad87594615ffe7394351cac823692cfa24 100644 (file)
@@ -137,10 +137,10 @@ int wxMacDataBrowserListControl::DoListHitTest(const wxPoint& inpoint) const
             }
 
             if ( point.y < bounds.top )
-                // index(bounds) greater then key(point)
+                // index(bounds) greater than key(point)
                 high = mid - 1;
             else
-                // index(bounds) less then key(point)
+                // index(bounds) less than key(point)
                 low = mid + 1;
         }
     }
@@ -213,7 +213,7 @@ OSStatus wxMacListBoxItem::GetSetData(wxMacDataItemBrowserControl *owner ,
             m_isChecked = newVal;
             err = noErr;
 
-            wxCommandEvent event( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, checklist->GetId() );
+            wxCommandEvent event( wxEVT_CHECKLISTBOX, checklist->GetId() );
             event.SetInt( owner->GetLineFromItem( this ) );
             event.SetEventObject( checklist );
             checklist->HandleWindowEvent( event );
@@ -337,8 +337,8 @@ wxMacDataBrowserListControl::wxMacDataBrowserListControl( wxWindow *peer, const
     err = SetHasScrollBars( (style & wxHSCROLL) != 0 , true );
 #if 0
     // shouldn't be necessary anymore under 10.2
-    m_peer->SetData( kControlNoPart, kControlDataBrowserIncludesFrameAndFocusTag, (Boolean)false );
-    m_peer->SetNeedsFocusRect( true );
+    GetPeer()->SetData( kControlNoPart, kControlDataBrowserIncludesFrameAndFocusTag, (Boolean)false );
+    GetPeer()->SetNeedsFocusRect( true );
 #endif
 }
 
@@ -362,7 +362,7 @@ void wxMacDataBrowserListControl::ItemNotification(
 
     if ((message == kDataBrowserSelectionSetChanged) && (!list->MacGetBlockEvents()))
     {
-        wxCommandEvent event( wxEVT_COMMAND_LISTBOX_SELECTED, list->GetId() );
+        wxCommandEvent event( wxEVT_LISTBOX, list->GetId() );
 
         int sel = list->GetSelection();
         if ((sel < 0) || (sel > (int) list->GetCount()))  // OS X can select an item below the last item (why?)
@@ -406,7 +406,7 @@ wxMacDataBrowserColumn* wxMacDataBrowserListControl::DoInsertColumn( unsigned in
     // TODO: Why is m_font not defined when we enter wxLC_LIST mode, but is
     // defined for other modes?
     wxFontEncoding enc;
-    if ( m_font.Ok() )
+    if ( m_font.IsOk() )
         enc = m_font.GetEncoding();
     else
         enc = wxLocale::GetSystemEncoding();