lua-users home
lua-l archive

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


John Labenski wrote:
On 11/27/05, Chris Marrin <chris@marrin.com> wrote:

Can you point to (in your repository) what you had to do to get it to
work (in 5.0 for now) so we can duplicate it?


I started to get your sources, but there's a lot in there. Are these
the only two directories that involve wxLua?

http://emma3d.org/svn/emma/mainline/dependencies/wxLua/
   - you made changes to the Library dir only it seems

http://emma3d.org/svn/emma/mainline/emma/runtime/wxgui/

I would suggest we just try to get my bug fixes/callback mechanism into your source base for now. That would be pretty easy. There are a few issues with the changes we made. First, we made a few changes and then restructured our tree. So it is easiest to look at the changes before restructuring and the changes after. Second, we added a few methods to wxLuaWrap.cpp. Since this is a generated file, we should have made these changes to the .lua file that generates it. But I don't understand how to do that, so I added it directly to the wxLuaWrap.cpp file. We ended up not using some of these, so I won't mention them below. Finally, you will see one attempt at adding a callback mechanism to wxLua which used a global function. I later replaced this with a more modular callback class. I will not mention the first attempt below.

Here is a summary of the changes. with the svn revision number where they were made. If you know how to use subversion, you can easily get diffs of the files involved. If not, let me know and I will generate diffs for you:

- 935 is where we added the wxLua source to the tree.
- 945 is where we generated and checked in wxLuaWrap.cpp
- 948 I made some changes to get wxLua to work with an existing Lua interpreter
- 1466 I got rid of some build warnings
- 1801 the tree was restructued and wxLua was moved
- 1805 made changes to get wxLua working with Lua 5.1
- 1970 and 2003 changed wxWindow:Move() method in wxLuaWrap.cpp to be relative to its parent window, if a parent exists
- 1983 Fixed a bug in wxLuaInternals.cpp that was trashing the stack
- 2016 Added a FindItemById() method to wxMenu in wxLuaWrap.cpp. This is helpful in interacting with Menus, which WxGUI supports in addition to Dialogs.
- 2462 This is the change where I added the new callback mechanism.
- 2523 Added Unload() to wxXmlResource in wxLuaWrap.cpp. This is needed to clean up the system on exit.

And that's pretty much it, not too bad.

If we can get these changes into your version of wxLua (or determine alternate ways of doing the same things), we can use that as our dependency. Then I can build my WxGUI package on top of that. We can either make WxGUI part of your wxLua distro, or I can keep it separate as part of Emma. I have already split Fusion out of Emma, which is what WxGUI depends on. Fusion is a Lua C++ wrapper library and I plan to make is a separate distro for use by Lua developers.

So there are lots of ways to go - let me know what you think is best.



--
chris marrin                ,""$,
chris@marrin.com          b`    $                             ,,.
                        mP     b'                            , 1$'
        ,.`           ,b`    ,`                              :$$'
     ,|`             mP    ,`                                       ,mm
   ,b"              b"   ,`            ,mm      m$$    ,m         ,`P$$
  m$`             ,b`  .` ,mm        ,'|$P   ,|"1$`  ,b$P       ,`  :$1
 b$`             ,$: :,`` |$$      ,`   $$` ,|` ,$$,,`"$$     .`    :$|
b$|            _m$`,:`    :$1   ,`     ,$Pm|`    `    :$$,..;"'     |$:
P$b,      _;b$$b$1"       |$$ ,`      ,$$"             ``'          $$
 ```"```'"    `"`         `""`        ""`                          ,P`
"As a general rule,don't solve puzzles that open portals to Hell"'