const wxValidator& validator,
const wxString& name)
{
+ if ( !wxChoiceBase::Create(parent, id, pos, size, style, validator, name) )
+ return false;
+
Rect bounds ;
Str255 title ;
if ( n > 0 )
SetControl32BitValue( (ControlHandle) m_macControl , 1 ) ;
MacPostControlCreate() ;
+ // TODO wxCB_SORT
for ( int i = 0; i < n; i++ )
{
Append(choices[i]);
delete GetClientObject(n);
}
::DeleteMenuItem( MAC_WXHMENU(m_macPopUpMenuHandle) , n + 1) ;
- m_strings.Remove( n ) ;
+ m_strings.RemoveAt( n ) ;
m_datas.RemoveAt( n ) ;
SetControl32BitMaximum( (ControlHandle) m_macControl , GetCount()) ;
}
wxString wxChoice::GetString(int n) const
{
+ wxCHECK_MSG( n >= 0 && (size_t)n < m_strings.GetCount(), _T(""),
+ _T("wxChoice::GetString(): invalid index") );
+
return m_strings[n] ;
}
+
// ----------------------------------------------------------------------------
// client data
// ----------------------------------------------------------------------------