>This is strange indeed. You do two things in your C++ program that
>aren't necessary and may/should cause problems.

>This statement should not even compile as wxLuaState::Create() returns a bool.
>m_wxlState = m_wxlState.Create(this);

You're right; I'm not sure why that worked, but I changed it to just 
`m_wxlState.Create(this)` and it is working the same.

>This is not necessary as wxLua does this already, but it may be harmless.
>luaL_openlibs(L);

I took that out, same behavior...  Seems to be harmless.

>You should do some simple debugging like printing the position and
>size of the wxButton to make sure that it really was created and does
>not have a zero size.

What I'm doing now -- and this is certainly one of the uglier hacks I've done 
-- is I'm creating widgets in C++, and passing the widget's ID to Lua; then, in 
Lua, I'm using FindWindowById and DynamicCast, and the widgets are placed 
correctly.

When I place a "C++" button side-by-side with a "Lua" (invisible) button, I get

C++ X,Y:                 0,  1241184
C++ Width, Height:      75, -1241176

Lua X,Y:           1241152,  1241184
Lua Width, Height: 3261761, -1241176

So it looks like Lua is placing the X and the Width out in Never-Never Land, 
but the Y and Height are fine.

I'm going to continue with the hack-y way of things right now, since I'm 
running behind schedule a bit.  If I figure out any kind of fix, I'll post back.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to