void Append(const wxString& item) { DoAppend(item); }
// with client data which belongs to the caller
void Append(const wxString &item, void* clientData)
- { DoAppend(item); SetClientData(GetCount() - 1, clientData); }
+ { int n = DoAppend(item); SetClientData(n, clientData); }
// with client data which will be deleted by the control
void Append(const wxString &item, wxClientData* clientData)
- { DoAppend(item); SetClientObject(GetCount() - 1, clientData); }
+ { int n = DoAppend(item); SetClientObject(n, clientData); }
// delete items from the list
// one item
private:
// pure virtuals to implement in the derived classes
- virtual void DoAppend(const wxString& item) = 0;
+ virtual int DoAppend(const wxString& item) = 0;
virtual void DoSetClientData( int n, void* clientData ) = 0;
virtual void* DoGetClientData( int n ) const = 0;
const wxString& name = wxChoiceNameStr);
// implement base class pure virtuals
- virtual void DoAppend(const wxString& item);
+ virtual int DoAppend(const wxString& item);
virtual void Delete(int n);
virtual void Clear();