// Author: David Elliott
// Modified by:
// Created: 2003/03/16
-// Id: $Id$
// Copyright: (c) 2003 David Elliott
-// Licence: wxWidgets licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
#import <Foundation/NSNotification.h>
#import <Foundation/NSDictionary.h>
-IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControlWithItems)
BEGIN_EVENT_TABLE(wxChoice, wxChoiceBase)
END_EVENT_TABLE()
// WX_IMPLEMENT_COCOA_OWNER(wxChoice,NSButton,NSControl,NSView)
int index = [[(NSPopUpButton*)m_cocoaNSView menu] indexOfItem: menuitem];
int selectedItem = [(NSPopUpButton*)m_cocoaNSView indexOfSelectedItem];
wxLogTrace(wxTRACE_COCOA,wxT("menuDidSendAction, index=%d, selectedItem=%d"), index, selectedItem);
- wxCommandEvent event(wxEVT_COMMAND_CHOICE_SELECTED, m_windowId);
+ wxCommandEvent event(wxEVT_CHOICE, m_windowId);
event.SetInt(index);
event.SetEventObject(this);
event.SetString(GetStringSelection());