> > So it looks like Lua is placing the X and the Width out in Never-Never
> > Land, but the Y and Height are fine.
> You have something seriously wrong with your build I believe. Even your C++
> created controls are all wrong. The position and size values should be in
> pixels from the upper left corner of the window.
I made a stupid copy-paste error when I tested that -- I was grabbing the Y and
Height from the Lua button both times. The C++ Y/Height are as they should be:
X,Y = (0,0); W,H = (75,23) or thereabout. The wxLua button has all enormous
(and apparently incorrect) values.
One strange thing is that if I do not use the normal method of creating a
button (`b = wx.wxButton(panel, wx.wxID_ANY, "fsdafsdafds")`), but I instead do
`b = wx.wxButton(); b:Create(panel, wx.wxID_ANY); b:SetLabel("fdsffsdfsdaf")`,
the x,y,w,h are all correct. Once again, the other widgets are placed
correctly around it, but `b` is not rendered, even if I do an explicit
`b:Show(true)`. `b:IsShown()` also returns true. I can even get a tooltip on
`b`, but I cannot seem to render the button or click on it. Maybe I'm just
missing some other, obvious method call?
> I recommend cleaning everything and rebuilding from scratch. You should also
> run your Lua program that prints out the positions of the windows in wxLua or
> wxLuaFreeze to see if you have the problem there.
I have rebuilt from scratch several times.
I actually haven't been able to build any of the wxLua* apps; I'm using
makefile.vc with VS2008 Express for the build process, with a Unicode Release,
static libraries, static runtimes, and it looks like the Lua libraries are
always built with the /MD flag when they should be /MT (at least in this case).
I'm not sure if this is something I'm doing wrong or if it's a Bakefile issue.
> One thing I noticed in Mark's code: Is there a reason to 'require
> ("wx")' if the wx is initialized in C++ code? I am just this could
> lead to some kind of double initialization? (I don't use require wx in
> my scripts)
I have removed it, and it doesn't seem to have made a difference.
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/wxlua-users