+ MenuHandle handle = NewMenu( nextPopUpMenuId , "\pMenu" );
+ nextPopUpMenuId++;
+ return handle;
+}
+
+#if USE_HICOMBOBOX
+static const EventTypeSpec eventList[] =
+{
+ { kEventClassTextField , kEventTextAccepted } ,
+};
+
+static pascal OSStatus wxMacComboBoxEventHandler( EventHandlerCallRef handler , EventRef event , void *data )
+{
+ OSStatus result = eventNotHandledErr;
+ wxComboBox* cb = (wxComboBox*) data;
+
+ wxMacCarbonEvent cEvent( event );
+
+ switch( cEvent.GetClass() )
+ {
+ case kEventClassTextField :
+ switch( cEvent.GetKind() )
+ {
+ case kEventTextAccepted :
+ {
+ wxCommandEvent event( wxEVT_COMMAND_COMBOBOX_SELECTED, cb->GetId() );
+ event.SetInt( cb->GetSelection() );
+ event.SetString( cb->GetStringSelection() );
+ event.SetEventObject( cb );
+ cb->GetEventHandler()->ProcessEvent( event );
+ }
+ break;
+ default :
+ break;
+ }
+ break;
+ default :
+ break;
+ }
+
+
+ return result;