+ // Provide the data
+ m_cocoaItems = [[NSMutableArray arrayWithCapacity:n] retain];
+ for(int i=0; i < n; i++)
+ {
+ [m_cocoaItems addObject: wxNSStringWithWxString(choices[i])];
+ }
+ // Remove everything
+ m_clientData.Clear();
+ // Initialize n elements to NULL
+ m_clientData.SetCount(n,NULL);
+
+ SetNSTableView([[NSTableView alloc] initWithFrame: MakeDefaultNSRect(size)]);
+ [m_cocoaNSView release];
+ [GetNSTableView() setHeaderView: nil];
+
+ // Set up the data source
+ m_cocoaDataSource = [[wxCocoaNSTableDataSource alloc] init];
+ [GetNSTableView() setDataSource:m_cocoaDataSource];
+
+ // Add the single column
+ NSTableColumn *tableColumn = [[NSTableColumn alloc] initWithIdentifier:nil];
+ [GetNSTableView() addTableColumn: tableColumn];
+ [tableColumn release];
+
+ [GetNSTableView() sizeToFit];
+ // Finish