X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e960ba596b4835e430fc22bb6f9f74436f96c2c5..76e7cfab8fdb0c7862fd07e427af54181717fc62:/src/cocoa/combobox.mm diff --git a/src/cocoa/combobox.mm b/src/cocoa/combobox.mm index 167078c5b9..9830122661 100644 --- a/src/cocoa/combobox.mm +++ b/src/cocoa/combobox.mm @@ -4,15 +4,14 @@ // Author: Ryan Norton // Modified by: // Created: 2005/02/16 -// RCS-ID: $Id$ // Copyright: (c) 2003 David Elliott -// Licence: wxWidgets licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // // Impl notes: // There is no custom data source because doing so unnecessarily sacrifices -// some native autocompletion behavior (we would have to make our own - +// some native autocompletion behaviour (we would have to make our own - // the SimpleComboBox sample does so in the developer folder that // comes with OSX). One reason you might want this would be to have // only one array or be able to display numbers returned by an NSNumber @@ -142,7 +141,7 @@ WX_DECLARE_GET_OBJC_CLASS(wxPoserNSComboBox,NSComboBox) - (void)comboBoxSelectionDidChange:(NSNotification *)notification { wxCocoaNSComboBox *win = wxCocoaNSComboBox::GetFromCocoa(self); - win->doWxEvent(wxEVT_COMMAND_COMBOBOX_SELECTED); + win->doWxEvent(wxEVT_COMBOBOX); } - (void)comboBoxSelectionIsChanging:(NSNotification *)notification @@ -168,7 +167,6 @@ WX_IMPLEMENT_GET_OBJC_CLASS(wxPoserNSComboBox,NSComboBox) #import -IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxControl) BEGIN_EVENT_TABLE(wxComboBox, wxControl) END_EVENT_TABLE() WX_IMPLEMENT_COCOA_OWNER(wxComboBox,NSComboBox,NSTextField,NSView) @@ -225,18 +223,18 @@ wxComboBox::~wxComboBox() void wxComboBox::doWxEvent(int nEvent) { - wxCommandEvent event2(wxEVT_COMMAND_COMBOBOX_SELECTED, GetId() ); + wxCommandEvent event2(wxEVT_COMBOBOX, GetId() ); event2.SetInt(GetSelection()); event2.SetEventObject(this); event2.SetString(GetStringSelection()); - GetEventHandler()->ProcessEvent(event2); + HandleWindowEvent(event2); // For consistency with MSW and GTK, also send a text updated event // After all, the text is updated when a selection is made - wxCommandEvent TextEvent( wxEVT_COMMAND_TEXT_UPDATED, GetId() ); + wxCommandEvent TextEvent( wxEVT_TEXT, GetId() ); TextEvent.SetString( GetStringSelection() ); TextEvent.SetEventObject( this ); - GetEventHandler()->ProcessEvent( TextEvent ); + HandleWindowEvent( TextEvent ); }