lua-users home
lua-l archive

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


On 11/28/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/

Are these right?

> 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

I don't see any restructuring? Maybe I'm looking in the wrong place?

> 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.

We don't use wxLuaWrap.cpp anymore.  Instead, we use a more
sophisticated binding mechanism that generates cpp files that compile
in any platform and wxWidgets settings. It uses the same .i files and
there's been many updates to them.

> 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.

I'm unfortunately not familiar with subversion, but I've been using
tkdiff to compare the sources in
http://emma3d.org/svn/emma/mainline/dependencies/wxLua/
to the most recent version of wxLua at
http://www.luascript.thersgb.net/

I'll try svn to see if I can get it to work. It seems like there's
only a couple dozen changes and all of them seem to make sense. As I
said I would rather just diff the final result of your changes than
try to track through them.

Notes:
All updates to the bindings are, of course, welcome, I'll try to add them.
   they all look pretty trivial, but why do this?
   1970 and 2003 changed wxWindow:Move()
   I assume it makes your life easier, but we should stick with the
wxWidgets functions
   to save ourself the trouble of "gotchas" like these for other users.
   We can always add an additional wxWindow::MoveRelative function
wxLuaNativeCallback can be replaced by this I think
    virtual void wxLuaCallback::CallFunction(wxEvent *pEvent);
I don't get any warnings anymore. :)  VC6/2003 & gcc in linux

It's a little disconcerting that lua_dostring and lua_dobuffer are
missing in 5.1. I hope there's a suitable replacement.

There's still a little more cleaning up to do with wxLua at SF, but
you can see the sources using the web CVS gui at SF. I'll try to write
some docs in the next few days.

> 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.

It looks like WxGui depends on Fusion (I'm not sure what that is, a
lua game engine I gather). I think it should be separate. Could you
explain a little what WxGui is? What does the panel have as controls.

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

If you can confirm the source dirs you use, I'll update the bindings
and it seems like you'd be ready to go.  The only problem is 5.1... I
want to wait just a little more to really be sure that things still
all work after my changes before I switch to 5.1. You can keep tabs on
it at the wxlua-users list on SF.

Regards,
    John Labenski