Short Problem with #include <wx/combobox.h>
Short Problem with #include <wx/combobox.h>
Dear, Community,
I have following Problem I will try to solve:
I need a Function who automatically add some Strings/Points-of-Choices to a ComboBox.
I think I can solve this by a Function in a Object/Class.
So I only need a unsorted Set in this Class.
Give my data in a Object of this Class,
Use my function which will iterate over this Set.
And append the Strings in this Set in the wxComboBox.
So you could think, I need a Parameter of this Function,
where I say this Function to which wxComboBox the strings should append.
So when there out is nothing who think he find a better way.
I need the #include <wx/combobox.h> in my Class Header.
But:
Every time I try this, I have errors in classes I never heard before of them.
So is there a workaround or some thing I could do better ???
Mungo1981
I have following Problem I will try to solve:
I need a Function who automatically add some Strings/Points-of-Choices to a ComboBox.
I think I can solve this by a Function in a Object/Class.
So I only need a unsorted Set in this Class.
Give my data in a Object of this Class,
Use my function which will iterate over this Set.
And append the Strings in this Set in the wxComboBox.
So you could think, I need a Parameter of this Function,
where I say this Function to which wxComboBox the strings should append.
So when there out is nothing who think he find a better way.
I need the #include <wx/combobox.h> in my Class Header.
But:
Every time I try this, I have errors in classes I never heard before of them.
So is there a workaround or some thing I could do better ???
Mungo1981
Re: Short Problem with #include <wx/combobox.h>
Try including <wx/wx.h> before any other wx header.
If that doesn't fix it, show the error messages you get.
If that doesn't fix it, show the error messages you get.
Use the source, Luke!
Re: Short Problem with #include <wx/combobox.h>
Ok, I have try what you say,
here are my ErrorCodes:
here are my ErrorCodes:
Code: Select all
||=== Build: Debug in Test100 (compiler: GNU GCC Compiler) ===|
/usr/local/include/wx-3.1/wx/object.h|361|Nicht definierter Verweis auf `wxObject::Ref(wxObject const&)'|
/usr/local/include/wx-3.1/wx/thread.h|291|Nicht definierter Verweis auf `wxMutex::Lock()'|
/usr/local/include/wx-3.1/wx/thread.h|293|Nicht definierter Verweis auf `wxMutex::Unlock()'|
/usr/local/include/wx-3.1/wx/window.h|525|Nicht definierter Verweis auf `wxWindowBase::GetBestSize() const'|
/usr/local/include/wx-3.1/wx/window.h|738|Nicht definierter Verweis auf `wxWindowBase::IsEnabled() const'|
/usr/local/include/wx-3.1/wx/window.h|870|Nicht definierter Verweis auf `wxEvtHandler::ProcessEventLocally(wxEvent&)'|
/usr/local/include/wx-3.1/wx/window.h|1032|Nicht definierter Verweis auf `wxWindowBase::GetCapture()'|
/usr/local/include/wx-3.1/wx/window.h|1113|Nicht definierter Verweis auf `wxWindowBase::GetClassDefaultAttributes(wxWindowVariant)'|
/usr/local/include/wx-3.1/wx/window.h|1817|Nicht definierter Verweis auf `wxDefaultSize'|
/usr/local/include/wx-3.1/wx/mdi.h|336|Nicht definierter Verweis auf `wxWindow::wxWindow()'|
/usr/local/include/wx-3.1/wx/gtk/mdi.h|141|Nicht definierter Verweis auf `vtable for wxMDIClientWindow'|
/usr/local/include/wx-3.1/wx/mdi.h|396|Nicht definierter Verweis auf `wxEVT_MENU'|
/usr/local/include/wx-3.1/wx/mdi.h|397|Nicht definierter Verweis auf `wxEVT_UPDATE_UI'|
/usr/local/include/wx-3.1/wx/mdi.h|406|Nicht definierter Verweis auf `wxWindowBase::IsDescendant(wxWindowBase*) const'|
/usr/local/include/wx-3.1/wx/mdi.h|414|Nicht definierter Verweis auf `wxWindowBase::TryBefore(wxEvent&)'|
/usr/local/include/wx-3.1/wx/event.h|213|Nicht definierter Verweis auf `wxEventFunctor::~wxEventFunctor()'|
/usr/local/include/wx-3.1/wx/thread.h|655|Nicht definierter Verweis auf `wxThread::~wxThread()'|
||=== Build failed: 17 error(s), 0 warning(s) (0 minute(s), 6 second(s)) ===|
Re: Short Problem with #include <wx/combobox.h>
Is this inside a wxWidgets application that compiles otherwise?
Use the source, Luke!
Re: Short Problem with #include <wx/combobox.h>
Yes,
its out my old MMA Music Composition Program.
With your help it run just easy and stable.
But I have had to change some thing.
It now has a ComboBox in the Panel
- you remember the old Problem with the first try Frame.
So this ComboBox should hold the Names of all Sequences.
And I think it calls me like a object who hold this data, and put it in the ComboBox.
its out my old MMA Music Composition Program.
With your help it run just easy and stable.
But I have had to change some thing.
It now has a ComboBox in the Panel
- you remember the old Problem with the first try Frame.
So this ComboBox should hold the Names of all Sequences.
And I think it calls me like a object who hold this data, and put it in the ComboBox.
Re: Short Problem with #include <wx/combobox.h>
Please show the beginning of the file that has all #includes.
Use the source, Luke!
Re: Short Problem with #include <wx/combobox.h>
Ok,
I'm late but here is the Information.
I'm was ill to high Diabetes about 400mg/dL.
So I could answer not earlier than just.
So I have run Code::Blocks
And so he capitulate not easy, he show me the Error-Messages I have show you.
I will repeat this Error-Messages here:
So I have seen in the Code he points he has an Error.
So I can see, he should call a Function Ref().
So I think it could be an Error I have build on the first thing I had to do.
I think it could be an Error by the installation on wxWidgets.
I'm late but here is the Information.
Code: Select all
#ifndef SEQSBASKET_H
#define SEQSBASKET_H
#include <wx/wx.h>
#include <wx/combobox.h>
class SeqsBasket
{
public:
SeqsBasket();
virtual ~SeqsBasket();
void setComboBox(wxComboBox* box);
protected:
private:
};
#endif // SEQSBASKET_H
So I could answer not earlier than just.
So I have run Code::Blocks
And so he capitulate not easy, he show me the Error-Messages I have show you.
I will repeat this Error-Messages here:
Code: Select all
||=== Build: Debug in Test100 (compiler: GNU GCC Compiler) ===|
/usr/local/include/wx-3.1/wx/object.h|361|Nicht definierter Verweis auf `wxObject::Ref(wxObject const&)'|
/usr/local/include/wx-3.1/wx/thread.h|291|Nicht definierter Verweis auf `wxMutex::Lock()'|
/usr/local/include/wx-3.1/wx/thread.h|293|Nicht definierter Verweis auf `wxMutex::Unlock()'|
/usr/local/include/wx-3.1/wx/window.h|525|Nicht definierter Verweis auf `wxWindowBase::GetBestSize() const'|
/usr/local/include/wx-3.1/wx/window.h|738|Nicht definierter Verweis auf `wxWindowBase::IsEnabled() const'|
/usr/local/include/wx-3.1/wx/window.h|870|Nicht definierter Verweis auf `wxEvtHandler::ProcessEventLocally(wxEvent&)'|
/usr/local/include/wx-3.1/wx/window.h|1032|Nicht definierter Verweis auf `wxWindowBase::GetCapture()'|
/usr/local/include/wx-3.1/wx/window.h|1113|Nicht definierter Verweis auf `wxWindowBase::GetClassDefaultAttributes(wxWindowVariant)'|
/usr/local/include/wx-3.1/wx/window.h|1817|Nicht definierter Verweis auf `wxDefaultSize'|
/usr/local/include/wx-3.1/wx/mdi.h|336|Nicht definierter Verweis auf `wxWindow::wxWindow()'|
/usr/local/include/wx-3.1/wx/gtk/mdi.h|141|Nicht definierter Verweis auf `vtable for wxMDIClientWindow'|
/usr/local/include/wx-3.1/wx/mdi.h|396|Nicht definierter Verweis auf `wxEVT_MENU'|
/usr/local/include/wx-3.1/wx/mdi.h|397|Nicht definierter Verweis auf `wxEVT_UPDATE_UI'|
/usr/local/include/wx-3.1/wx/mdi.h|406|Nicht definierter Verweis auf `wxWindowBase::IsDescendant(wxWindowBase*) const'|
/usr/local/include/wx-3.1/wx/mdi.h|414|Nicht definierter Verweis auf `wxWindowBase::TryBefore(wxEvent&)'|
/usr/local/include/wx-3.1/wx/event.h|213|Nicht definierter Verweis auf `wxEventFunctor::~wxEventFunctor()'|
/usr/local/include/wx-3.1/wx/thread.h|655|Nicht definierter Verweis auf `wxThread::~wxThread()'|
||=== Build failed: 17 error(s), 0 warning(s) (0 minute(s), 5 second(s)) ===|
So I can see, he should call a Function Ref().
Code: Select all
wxObject& operator=(const wxObject& other)
{
if ( this != &other )
{
Ref(other);
}
return *this;
}
bool IsKindOf(const wxClassInfo *info) const;
I think it could be an Error by the installation on wxWidgets.
Re: Short Problem with #include <wx/combobox.h>
Normally i'd say there's a problem with the wxWidgets or CB configuration. But as you've said this is inside a wx app that compiles without the new changes, i have no clue what the problem could be.
Can you show the beginning of the .cpp file where "SeqsBasket.h" (or how it's called) gets included?
Can you show the beginning of the .cpp file where "SeqsBasket.h" (or how it's called) gets included?
Use the source, Luke!
Re: Short Problem with #include <wx/combobox.h>
Here are the x.cpp:
You can see I have modify the Code a little bit,:
So I become lesser Error Messages:
And this my x.h::
Code: Select all
#include <wx/combobox.h>
#include "SeqsNameBasket.h"
SeqsNameBasket::SeqsNameBasket()
{
//ctor
}
SeqsNameBasket::~SeqsNameBasket()
{
//dtor
}
void SeqsNameBasket::setComboBox(wxComboBox box)
{
}
So I become lesser Error Messages:
Code: Select all
||=== Build: Debug in Test100 (compiler: GNU GCC Compiler) ===|
/usr/local/include/wx-3.1/wx/thread.h|291|Nicht definierter Verweis auf `wxMutex::Lock()'|
/usr/local/include/wx-3.1/wx/thread.h|293|Nicht definierter Verweis auf `wxMutex::Unlock()'|
/usr/local/include/wx-3.1/wx/event.h|213|Nicht definierter Verweis auf `wxEventFunctor::~wxEventFunctor()'|
/usr/local/include/wx-3.1/wx/thread.h|655|Nicht definierter Verweis auf `wxThread::~wxThread()'|
||=== Build failed: 4 error(s), 0 warning(s) (0 minute(s), 3 second(s)) ===|
And this my x.h::
Code: Select all
#ifndef SEQSNAMEBASKET_H
#define SEQSNAMEBASKET_H
class SeqsNameBasket
{
public:
SeqsNameBasket();
virtual ~SeqsNameBasket();
void setComboBox(wxComboBox box);
protected:
private:
};
#endif // SEQSNAMEBASKET_H
Re: Short Problem with #include <wx/combobox.h>
Code: Select all
#include <wx/combobox.h>
#include "SeqsNameBasket.h"
And the x.h is different from the one you posted earlier.
Use the source, Luke!
Re: Short Problem with #include <wx/combobox.h>
Ok,
I have included include "wx/wx.h"
But it will give me the first set of Errors.
I have included include "wx/wx.h"
But it will give me the first set of Errors.
Re: Short Problem with #include <wx/combobox.h>
I assume you can build the "minimal" sample that comes with wxWidgets?
If yes, copy the following header file into the directory and include it after this block:
If yes, copy the following header file into the directory and include it after this block:
Code: Select all
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
#include "SeqsNameBasket.h" // <- new line
Code: Select all
#ifndef SEQSBASKET_H
#define SEQSBASKET_H
#include <wx/wx.h>
#include <wx/combobox.h>
class SeqsBasket
{
public:
SeqsBasket();
virtual ~SeqsBasket();
void setComboBox(wxComboBox* box);
protected:
private:
};
#endif // SEQSBASKET_H
Use the source, Luke!
Re: Short Problem with #include <wx/combobox.h>
Ok,
Just I have try your last recommendation,
and now the Code would compile graceful.
I'm have this evening to much to do.
Cleaning my Home, Cleaning my Computer ....
So I would think I will check how it works tomorrow.
But just I can say you my very thanks,
and my esteem.
So with very much thanks:
Mungo1981
Just I have try your last recommendation,
and now the Code would compile graceful.
I'm have this evening to much to do.
Cleaning my Home, Cleaning my Computer ....
So I would think I will check how it works tomorrow.
But just I can say you my very thanks,
and my esteem.
So with very much thanks:
Mungo1981
Re: Short Problem with #include <wx/combobox.h>
So,
I find this could be the solution.
But what is the magical Difference.
Why it works now, but nothing before.
Can you please tell it me, so I will be in the power to repeat it by my self in the Future.
I find this could be the solution.
But what is the magical Difference.
Why it works now, but nothing before.
Can you please tell it me, so I will be in the power to repeat it by my self in the Future.
Re: Short Problem with #include <wx/combobox.h>
So you're saying that this now also works in your project, not only the "minimal" sample?
I think in the end, the problem always was that you used "wx/combox.h" before "wx/wx.h" was included. Including wx.h first is important, because it sets a lot of build and platform related #defines that are used in all other include files.
But as i never had the complete picture of your code, i can only guess.
I think in the end, the problem always was that you used "wx/combox.h" before "wx/wx.h" was included. Including wx.h first is important, because it sets a lot of build and platform related #defines that are used in all other include files.
But as i never had the complete picture of your code, i can only guess.
Use the source, Luke!