-int wxChoice::DoInsert(const wxString& title, int pos)
-{
- if(m_sortedStrings)
- return DoAppend(title);
- NSMenu *nsmenu = [(NSPopUpButton*)m_cocoaNSView menu];
- NSMenuItem *item = [nsmenu insertItemWithTitle:wxNSStringWithWxString(title)
- action: nil keyEquivalent:@"" atIndex:pos];
- m_itemsClientData.Insert(NULL, pos);
+ item = [nsmenu insertItemWithTitle:wxNSStringWithWxString(str)
+ action: nil keyEquivalent:@"" atIndex:idx];
+ m_itemsClientData.Insert(NULL, idx);
+ AssignNewItemClientData(idx, clientData, i, type);
+ }