Changing no code at all, after a recompilation of all libs and my sources these calls no longer work:
Code: Select all
void AGE_Frame::OnUpdateCombo_Techs(wxCommandEvent &event)
{
wxMessageBox("AGE_Frame::OnUpdateCombo_Techs");
((AGELinkedBox*)event.GetEventObject())->OnChoose(event); // <-- Fully ignored!
ListEffects();
}
Code: Select all
void ComboBox_Plus1::OnChoose(wxCommandEvent&)
{
wxMessageBox("ComboBox_Plus1::OnChoose");
TextBox->ChangeValue(lexical_cast<string>(GetSelection() - 1));
TextBox->SaveEdits();
}
This here is my custom combo box and the pure virtual class from where it derives.
Code: Select all
class ComboBox_Plus1: public AGEComboBox, public AGELinkedBox
{
public:
ComboBox_Plus1(wxWindow *parent, AGETextCtrl *ptr, wxArrayString *choices, int width = AGETextCtrl::LARGE):
AGEComboBox(parent, choices, width, 0)
{
TextBox = ptr;
TextBox->LinkedBoxes.push_back(this);
Bind(wxEVT_COMMAND_COMBOBOX_SELECTED, &ComboBox_Plus1::OnChoose, this);
}
private:
void OnChoose(wxCommandEvent&);
void SetChoice(int);
void EnableCtrl(bool yes) {Enable(yes);}
};
Code: Select all
class AGETextCtrl;
class AGELinkedBox
{
public:
virtual void OnChoose(wxCommandEvent&)=0;
virtual void SetChoice(int)=0;
virtual void EnableCtrl(bool)=0;
AGETextCtrl *TextBox;
};
Is wxWidgets incompatible with C++14 yet, or am I doing something wrong?