int initialSelection)
{
wxSingleChoiceDialog dialog(parent, message, caption, n, choices,
- (char **)client_data);
+ client_data);
dialog.SetSelection(initialSelection);
void *data;
if ( dialog.ShowModal() == wxID_OK )
- data = dialog.GetSelectionClientData();
+ data = dialog.GetSelectionData();
else
data = NULL;
IMPLEMENT_DYNAMIC_CLASS(wxSingleChoiceDialog, wxDialog)
-wxSingleChoiceDialog::wxSingleChoiceDialog(wxWindow *parent,
- const wxString& message,
- const wxString& caption,
- int n,
- const wxString *choices,
- char **clientData,
- long style,
- const wxPoint& WXUNUSED(pos))
-{
- Create(parent, message, caption, n, choices, clientData, style);
-}
-
-wxSingleChoiceDialog::wxSingleChoiceDialog(wxWindow *parent,
- const wxString& message,
- const wxString& caption,
- const wxArrayString& choices,
- char **clientData,
- long style,
- const wxPoint& WXUNUSED(pos))
-{
- Create(parent, message, caption, choices, clientData, style);
-}
-
bool wxSingleChoiceDialog::Create( wxWindow *parent,
const wxString& message,
const wxString& caption,
int n,
const wxString *choices,
- char **clientData,
+ void **clientData,
long style,
const wxPoint& pos )
{
const wxString& message,
const wxString& caption,
const wxArrayString& choices,
- char **clientData,
+ void **clientData,
long style,
const wxPoint& pos )
{
// Set the selection
void wxSingleChoiceDialog::SetSelection(int sel)
{
- wxCHECK_RET( sel > 0 && (unsigned)sel < m_listbox->GetCount(),
+ wxCHECK_RET( sel >= 0 && (unsigned)sel < m_listbox->GetCount(),
"Invalid initial selection" );
m_listbox->SetSelection(sel);