lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Old thread, but I ran into this 'problem' recently. Wanted to embed the
editor.wx.wlua into my app so I could write test code with a nice editor
without restarting the app. It couldn't run as a module due to the
event-handling/environment issue so at first I modified the code to avoid
naming conflicts and run it in the same environment. But I really wanted to
run it as a module so I modified wxLuaEventCallback.

The changes are minimal. Save the environment alongside the function in
::Connect and load it in ::OnEvent, instead of always loading the global
environment.

I could post my changes to wxLua if anyone is interested.



--
View this message in context: http://lua.2524044.n2.nabble.com/Environments-tp7632541p7668172.html
Sent from the Lua-l mailing list archive at Nabble.com.