- CFIndex outIndex;
- HIComboBoxAppendTextItem( *m_peer, wxMacCFStringHolder( item, m_font.GetEncoding() ), &outIndex );
- //SetControl32BitMaximum( *m_peer, GetCount() );
- return (int) outIndex;
+ const unsigned int count = items.GetCount();
+ for ( unsigned int i = 0; i < count; ++i, ++pos )
+ {
+ HIComboBoxInsertTextItemAtIndex(m_peer->GetControlRef(),
+ (CFIndex)pos,
+ wxMacCFStringHolder(items[i],
+ GetFont().GetEncoding()));
+ AssignNewItemClientData(pos, clientData, i, type);
+ }
+
+ //SetControl32BitMaximum( m_peer->GetControlRef(), GetCount() );
+
+ return pos - 1;