Therefore I have made a class similar to the BuildTab (including de EVENT_TABLE and DECLARE_EVENT_TABLE).
I also call my class from Frame::OnNextBuildError(wxCommandEvent &event), yet I do not receive them.
Below is the code:
Header
========================
Code: Select all
class ErrorsTab : public OutputTabWindow {
{
...
public:
DECLARE_EVENT_TABLE()
};
========================
Code: Select all
#include "editor_config.h"
#include "precompiled_header.h"
#include "frame.h"
#include "wx/regex.h"
#include "buildtabsettingsdata.h"
#include "regex_processor.h"
#include "macros.h"
#include "wx/xrc/xmlres.h"
#include "build_settings_config.h"
#include "compiler.h"
#include "manager.h"
#include "project.h"
#include "wx/wxscintilla.h"
#include "errorstab.h"
#ifndef wxScintillaEventHandler
#define wxScintillaEventHandler(func) \
(wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxScintillaEventFunction, &func)
#endif
BEGIN_EVENT_TABLE(ErrorsTab, wxPanel)
EVT_MENU(XRCID("next_error"), ErrorsTab::OnNextBuildError)
END_EVENT_TABLE()
rrorsTab::ErrorsTab(wxWindow *parent, wxWindowID id, const wxString &name)
: OutputTabWindow(parent, id, name)
{
}
void ErrorsTab::OnNextBuildError(wxCommandEvent &event)
{
wxUnusedVar(event);
// do something
}
Code: Select all
========================
Code: Select all
void Frame::OnNextBuildError(wxCommandEvent &event)
{
GetOutputPane()->GetBuildTab()->ProcessEvent(event);
GetOutputPane()->GetErrorsTab()->ProcessEvent(event);
}