- [GetNSComboBox() addItemWithObjectValue:wxNSStringWithWxString(szItem)];
- return [GetNSComboBox() numberOfItems];
-}
-
-int wxComboBox::DoInsert(const wxString& szItem, unsigned int nIndex)
-{
- m_Datas.Insert(NULL, nIndex);
- wxAutoNSAutoreleasePool pool;
- [GetNSComboBox() insertItemWithObjectValue:wxNSStringWithWxString(szItem) atIndex:nIndex];
- return (int)nIndex;
+ const unsigned int numITems = items.GetCount();
+ for ( unsigned int i = 0; i < numITems; ++i, ++pos )
+ {
+ [GetNSComboBox() insertItemWithObjectValue:wxNSStringWithWxString(items[i]) atIndex:(pos)];
+ m_Datas.Insert(NULL, pos);
+ AssignNewItemClientData(pos, clientData, i, type);
+ }
+ return pos - 1;