From: <pst...@us...> - 2011-08-05 00:02:56
|
Revision: 867 http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=867&view=rev Author: pstieber Date: 2011-08-05 00:02:50 +0000 (Fri, 05 Aug 2011) Log Message: ----------- Upgraded from wxStringList to wxArrayString. Modified Paths: -------------- trunk/jazz/src/DeprecatedWx/propform.cpp trunk/jazz/src/DeprecatedWx/propform.h Modified: trunk/jazz/src/DeprecatedWx/propform.cpp =================================================================== --- trunk/jazz/src/DeprecatedWx/propform.cpp 2011-08-04 23:54:54 UTC (rev 866) +++ trunk/jazz/src/DeprecatedWx/propform.cpp 2011-08-05 00:02:50 UTC (rev 867) @@ -673,7 +673,7 @@ /// IMPLEMENT_DYNAMIC_CLASS(wxStringFormValidator, wxPropertyFormValidator) -wxStringFormValidator::wxStringFormValidator(wxStringList *list, long flags): +wxStringFormValidator::wxStringFormValidator(wxArrayString *list, long flags): wxPropertyFormValidator(flags) { m_strings = list; @@ -692,7 +692,7 @@ if (m_propertyWindow->IsKindOf(CLASSINFO(wxTextCtrl))) { wxTextCtrl *text = (wxTextCtrl *)m_propertyWindow; - if (!m_strings->Member(text->GetValue())) + if (m_strings->Index(text->GetValue()) == wxNOT_FOUND) { wxString str( wxT("Value ") ); str += text->GetValue(); @@ -765,12 +765,13 @@ if (lbox->GetCount() == 0 && m_strings) { // Try to initialize the listbox from 'strings' - wxStringList::compatibility_iterator node = m_strings->GetFirst(); - while (node) + for ( + wxArrayString::iterator iString = m_strings->begin(); + iString != m_strings->end(); + ++iString) { - const wxChar* s = node->GetData(); + const wxString& s = *iString; lbox->Append(s); - node = node->GetNext(); } } lbox->SetStringSelection(property->GetValue().StringValue()); @@ -789,12 +790,13 @@ { // Try to initialize the choice item from 'strings' // XView doesn't allow this kind of thing. - wxStringList::compatibility_iterator node = m_strings->GetFirst(); - while (node) + for ( + wxArrayString::iterator iString = m_strings->begin(); + iString != m_strings->end(); + ++iString) { - const wxChar* s = node->GetData(); + const wxString& s = *iString; choice->Append(s); - node = node->GetNext(); } } choice->SetStringSelection(property->GetValue().StringValue()); Modified: trunk/jazz/src/DeprecatedWx/propform.h =================================================================== --- trunk/jazz/src/DeprecatedWx/propform.h 2011-08-04 23:54:54 UTC (rev 866) +++ trunk/jazz/src/DeprecatedWx/propform.h 2011-08-05 00:02:50 UTC (rev 867) @@ -253,7 +253,7 @@ { DECLARE_DYNAMIC_CLASS(wxStringFormValidator) public: - wxStringFormValidator(wxStringList *list = NULL, long flags = 0); + wxStringFormValidator(wxArrayString *list = NULL, long flags = 0); ~wxStringFormValidator(void) { @@ -266,7 +266,7 @@ bool OnDisplayValue(wxProperty *property, wxPropertyFormView *view, wxWindow *parentWindow); protected: - wxStringList* m_strings; + wxArrayString* m_strings; }; /* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |