Don't assert when creating wxComboBox with wxCB_SORT in wxOSX
Partially undo the changes of 8e7262fca7
: using
wxLogWarning() was wrong, but using asserts is not really great neither as it
results in crashes, and prevents from using, some samples.
Also at least document that this style is not supported.
See #12419.
This commit is contained in:
@@ -38,7 +38,8 @@
|
|||||||
allows the user to choose from the list of options but doesn't allow
|
allows the user to choose from the list of options but doesn't allow
|
||||||
to enter a value not present in the list.
|
to enter a value not present in the list.
|
||||||
@style{wxCB_SORT}
|
@style{wxCB_SORT}
|
||||||
Sorts the entries in the list alphabetically.
|
Sorts the entries in the list alphabetically. Notice that this style
|
||||||
|
is not currently implemented in wxOSX.
|
||||||
@style{wxTE_PROCESS_ENTER}
|
@style{wxTE_PROCESS_ENTER}
|
||||||
The control will generate the event @c wxEVT_TEXT_ENTER
|
The control will generate the event @c wxEVT_TEXT_ENTER
|
||||||
(otherwise pressing Enter key is either processed internally by the
|
(otherwise pressing Enter key is either processed internally by the
|
||||||
|
@@ -56,9 +56,6 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
|
|||||||
if ( !wxControl::Create( parent, id, pos, size, style, validator, name ) )
|
if ( !wxControl::Create( parent, id, pos, size, style, validator, name ) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
wxASSERT_MSG( !(style & wxCB_SORT),
|
|
||||||
"wxCB_SORT not currently supported by wxOSX/Cocoa");
|
|
||||||
|
|
||||||
SetPeer(wxWidgetImpl::CreateComboBox( this, parent, id, NULL, pos, size, style, GetExtraStyle() ));
|
SetPeer(wxWidgetImpl::CreateComboBox( this, parent, id, NULL, pos, size, style, GetExtraStyle() ));
|
||||||
|
|
||||||
MacPostControlCreate( pos, size );
|
MacPostControlCreate( pos, size );
|
||||||
|
Reference in New Issue
Block a user