+void wxListWidgetCocoaImpl::controlAction(WXWidget WXUNUSED(slf),void* WXUNUSED(_cmd), void *WXUNUSED(sender))
+{
+ wxListBox *list = static_cast<wxListBox*> ( GetWXPeer());
+ wxCHECK_RET( list != NULL , wxT("Listbox expected"));
+
+ wxCommandEvent event( wxEVT_COMMAND_LISTBOX_SELECTED, list->GetId() );
+
+ int sel = [m_tableView clickedRow];
+ if ((sel < 0) || (sel > (int) list->GetCount())) // OS X can select an item below the last item (why?)
+ return;
+
+ list->HandleLineEvent( sel, false );
+}
+
+void wxListWidgetCocoaImpl::controlDoubleAction(WXWidget WXUNUSED(slf),void* WXUNUSED(_cmd), void *WXUNUSED(sender))
+{
+ wxListBox *list = static_cast<wxListBox*> ( GetWXPeer());
+ wxCHECK_RET( list != NULL , wxT("Listbox expected"));
+
+ int sel = [m_tableView clickedRow];
+ if ((sel < 0) || (sel > (int) list->GetCount())) // OS X can select an item below the last item (why?)
+ return;
+
+ list->HandleLineEvent( sel, true );
+}