On Fri, Nov 20, 2009 at 9:14 AM, Mark Rushakoff
<mrushak...@lafayetteinstrument.com> wrote:
>
> 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 still suspect something off about your program or build since such a
small change in code should not make any difference at all. I still
suggest trying to compile and run wxLuaFreeze.exe (see below). At
first glance the C++ program you posted looks ok, but one more thing
to try is to rem out the lines below and see if it works. I tried to
make eliminating wxLua libs work, but maybe there is a problem with my
implementation. In any case, these defines are supposed to be set when
you compile the wxLua libs *and* your app, but I don't see why it
would matter.

   #define wxLUA_USEBINDING_WXHTML 0
   #define wxLUA_USEBINDING_WXNET 0
   #define wxLUA_USEBINDING_WXLUASOCKET 0
   #define wxLUA_USEBINDING_WXSTC 0

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

I didn't know this. I have used makefile.vc with Visual Studio 6
without error or warning. If you merely change it to /MT can you
compile the wxLua.exe and wxLuaFreeze.exe apps and test your program?
I will try this with VC6 and make the change if it works for both.

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

This does not matter since wxLua checks to see if it was installed and
does nothing if called twice. The line exists in all the sample
programs so that they can be run with lua.exe and the wx.dll or the
statically compiled wxlua.exe or wxluafreeze.exe.

Regards,
    John

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