diff --git a/wxLua/modules/wxlua/wxlstate.cpp b/wxLua/modules/wxlua/wxlstate.cpp index 8518a9e9..18005b6b 100644 --- a/wxLua/modules/wxlua/wxlstate.cpp +++ b/wxLua/modules/wxlua/wxlstate.cpp @@ -2356,6 +2356,20 @@ void wxLuaState::AddLuaPath(const wxFileName& filename) // wxLuaEvent //----------------------------------------------------------------------------- +#if wxCHECK_VERSION(3,0,0) +wxDEFINE_EVENT(wxEVT_LUA_CREATION, wxLuaEvent); +wxDEFINE_EVENT(wxEVT_LUA_PRINT, wxLuaEvent); +wxDEFINE_EVENT(wxEVT_LUA_ERROR, wxLuaEvent); +wxDEFINE_EVENT(wxEVT_LUA_DEBUG_HOOK, wxLuaEvent); +#else +DEFINE_LOCAL_EVENT_TYPE(wxEVT_LUA_CREATION) +DEFINE_LOCAL_EVENT_TYPE(wxEVT_LUA_PRINT) +DEFINE_LOCAL_EVENT_TYPE(wxEVT_LUA_ERROR) +DEFINE_LOCAL_EVENT_TYPE(wxEVT_LUA_DEBUG_HOOK) +//DEFINE_LOCAL_EVENT_TYPE(wxEVT_LUA_INIT) +//DEFINE_LOCAL_EVENT_TYPE(wxEVT_LUA_DEBUGGERATTACHED) +#endif + wxLuaEvent::wxLuaEvent(wxEventType commandType, wxWindowID id, const wxLuaState& wxlState) :wxNotifyEvent(commandType, id), m_wxlState(wxlState), m_debug_hook_break(false), diff --git a/wxLua/modules/wxlua/wxlstate.h b/wxLua/modules/wxlua/wxlstate.h index eff8a514..64b59bb2 100644 --- a/wxLua/modules/wxlua/wxlstate.h +++ b/wxLua/modules/wxlua/wxlstate.h @@ -792,18 +792,6 @@ class WXDLLIMPEXP_WXLUA wxLuaEvent: public wxNotifyEvent lua_Debug *m_lua_Debug; }; -#if wxCHECK_VERSION(3,0,0) -wxDEFINE_EVENT(wxEVT_LUA_CREATION, wxLuaEvent); -wxDEFINE_EVENT(wxEVT_LUA_PRINT, wxLuaEvent); -wxDEFINE_EVENT(wxEVT_LUA_ERROR, wxLuaEvent); -wxDEFINE_EVENT(wxEVT_LUA_DEBUG_HOOK, wxLuaEvent); -#else -DEFINE_LOCAL_EVENT_TYPE(wxEVT_LUA_CREATION) -DEFINE_LOCAL_EVENT_TYPE(wxEVT_LUA_PRINT) -DEFINE_LOCAL_EVENT_TYPE(wxEVT_LUA_ERROR) -DEFINE_LOCAL_EVENT_TYPE(wxEVT_LUA_DEBUG_HOOK) -#endif - #if wxCHECK_VERSION(3,0,0) // A wxLuaState is being created, sent at the end of // wxLuaState(wxEvtHandler, win id) or Create(wxEvtHandler, win id)