Tim Burgess
2014-07-05 16:35:03 UTC
Hi,
I'm converting a QT4 application to use WX in order to improve its
accessibility. For this reason I'm trying to use wxList as the nearest
equivalent to the qlist class. However, I'm doing something wrong, as I get
the following compilation error from VS2010:
1>clipboard.cpp(242): error C2679: binary '=' : no operator found which
takes a right-hand operand of type 'wxObjectList::iterator' (or there is no
acceptable conversion)
I have the following in my header file:
...
#include "EWI4000SPatch.h" // class definition for the list members
#include <wx/list.h>
WX_DECLARE_LIST(patch_t, clipboard_list);
Class clipboard
{
...
Private:
wxList clipboard_list;
};
In my .cpp I have:
#include "clipboard.h"
#include <wx/listimpl.cpp>
WX_DEFINE_LIST(clipboard_list);
...
In one of my members, I try to iterate through the members of the list in
order to locate one of them based on its position:
...
clipboard_list::iterator it;
patch_t * pPatch;
unsigned int i = 0;
for (it = clipboard_list.begin(); it != clipboard_list.end(); it++)
{
if (i = nSelection)
{
pPatch = *it;
}
i++;
}
The error refers to the line containing the "for".
Can anybody advise me as to where I'm going wrong, please? I thought I'd
followed the example in the .chm help file topic on wxList, but I must have
missed something.
Best wishes.
Tim Burgess
I'm converting a QT4 application to use WX in order to improve its
accessibility. For this reason I'm trying to use wxList as the nearest
equivalent to the qlist class. However, I'm doing something wrong, as I get
the following compilation error from VS2010:
1>clipboard.cpp(242): error C2679: binary '=' : no operator found which
takes a right-hand operand of type 'wxObjectList::iterator' (or there is no
acceptable conversion)
I have the following in my header file:
...
#include "EWI4000SPatch.h" // class definition for the list members
#include <wx/list.h>
WX_DECLARE_LIST(patch_t, clipboard_list);
Class clipboard
{
...
Private:
wxList clipboard_list;
};
In my .cpp I have:
#include "clipboard.h"
#include <wx/listimpl.cpp>
WX_DEFINE_LIST(clipboard_list);
...
In one of my members, I try to iterate through the members of the list in
order to locate one of them based on its position:
...
clipboard_list::iterator it;
patch_t * pPatch;
unsigned int i = 0;
for (it = clipboard_list.begin(); it != clipboard_list.end(); it++)
{
if (i = nSelection)
{
pPatch = *it;
}
i++;
}
The error refers to the line containing the "for".
Can anybody advise me as to where I'm going wrong, please? I thought I'd
followed the example in the .chm help file topic on wxList, but I must have
missed something.
Best wishes.
Tim Burgess
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users