You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(60) |
Jul
(35) |
Aug
(32) |
Sep
(5) |
Oct
(5) |
Nov
(58) |
Dec
(34) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(114) |
Feb
(184) |
Mar
(153) |
Apr
(90) |
May
(153) |
Jun
(59) |
Jul
(24) |
Aug
(43) |
Sep
(17) |
Oct
(34) |
Nov
(11) |
Dec
(204) |
2007 |
Jan
(84) |
Feb
(119) |
Mar
(38) |
Apr
(28) |
May
(52) |
Jun
(105) |
Jul
(64) |
Aug
(67) |
Sep
(14) |
Oct
(3) |
Nov
(28) |
Dec
(55) |
2008 |
Jan
(228) |
Feb
(55) |
Mar
(30) |
Apr
(30) |
May
(15) |
Jun
(20) |
Jul
(12) |
Aug
(3) |
Sep
(13) |
Oct
(54) |
Nov
(35) |
Dec
(35) |
2009 |
Jan
(19) |
Feb
(20) |
Mar
(34) |
Apr
(4) |
May
(60) |
Jun
(25) |
Jul
(16) |
Aug
(51) |
Sep
(19) |
Oct
(62) |
Nov
(21) |
Dec
(12) |
2010 |
Jan
(1) |
Feb
|
Mar
(4) |
Apr
(12) |
May
(23) |
Jun
(13) |
Jul
(1) |
Aug
(40) |
Sep
(18) |
Oct
(21) |
Nov
(26) |
Dec
(34) |
2011 |
Jan
(17) |
Feb
(23) |
Mar
(1) |
Apr
(10) |
May
(1) |
Jun
(5) |
Jul
(1) |
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
(43) |
2012 |
Jan
(5) |
Feb
(19) |
Mar
(6) |
Apr
(24) |
May
(39) |
Jun
(83) |
Jul
(29) |
Aug
(36) |
Sep
(64) |
Oct
(55) |
Nov
(12) |
Dec
(7) |
2013 |
Jan
(17) |
Feb
(10) |
Mar
(37) |
Apr
(27) |
May
(13) |
Jun
(9) |
Jul
(7) |
Aug
(61) |
Sep
(23) |
Oct
(23) |
Nov
(30) |
Dec
(16) |
2014 |
Jan
(23) |
Feb
(13) |
Mar
(9) |
Apr
(17) |
May
(2) |
Jun
(11) |
Jul
(2) |
Aug
|
Sep
(9) |
Oct
(24) |
Nov
(2) |
Dec
(14) |
2015 |
Jan
(6) |
Feb
(4) |
Mar
(17) |
Apr
|
May
(7) |
Jun
(3) |
Jul
|
Aug
|
Sep
(2) |
Oct
(21) |
Nov
(6) |
Dec
(2) |
2016 |
Jan
(4) |
Feb
(2) |
Mar
(7) |
Apr
(3) |
May
(11) |
Jun
(6) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
(6) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(4) |
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(8) |
Nov
|
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: John L. <jla...@gm...> - 2013-08-26 03:51:35
|
On Sun, Aug 25, 2013 at 6:42 AM, Andreas Falkenhahn <an...@fa...> wrote: ... > > > What is confusing me here is this: The m_window pointer is always the same but in each > callback I get a different class name. How can this be? I'd expect to get "wxFrame" > in each callback but instead I get "wxFrame" only in the constructor. In the other > two callbacks it is "wxWindow" and then even "wxEvtHandler".... I don't understand > this. What is going on there? > The window is just being cast to different types, It looks like the GetClassInfo() function is virtual, as defined in wxDECLARE_ABSTRACT_CLASS, so it returns whatever the object is cast to at that time, which is what you see. C++ doesn't really know what type any particular object really is. The first case where the object is passed by wxWindow* pointer to the wxLuaWinDestroyCallback seems odd, but it's a wxFrame that being passed in and the wxWindow* arg doesn't really make a new pointer object, it just passes the frame though it. Regards, John |
From: John L. <jla...@gm...> - 2013-08-26 03:15:13
|
On Sun, Aug 25, 2013 at 4:24 PM, Andreas Falkenhahn <an...@fa...>wrote: ... > But how should I do it in wxLua? If I'd derive a whole new class from > wxWindow I'd have to create new bindings for it etc. This all sounds > quite complicated so I'd to know if there is an easier way to hook into > the wxWindow::Destroy method for every wxWindow object created by > wxLua. > > Connecting to wxEVT_DESTROY is probably not sufficient because AFAICS > destruction is already in process when this event is sent, but I'd > like to run my custom code *before* the destruction process is actually > started. > > wxLua only supports using wxEVT_DESTROY. Usually you can handle destroying windows by managing how and who deletes them. wxWidgets only deletes the children of a window when it is destroyed and only top level windows (wxFrame/wxDialog) can be destroyed "by themselves," but you can veto wxEVT_CLOSE events. I would try to refactor your code to work either with wxEVT_DESTROY or manage deletion from the top down by doing what you need to do before calling Destroy() on the window yourself. Regards, John |
From: Andreas F. <an...@fa...> - 2013-08-25 20:24:17
|
Hi, this one has to do with my limited C++ skills again: I'm looking for an easy solution for all my wxWindow objects to run some custom code in C++ whenever their wxWindow::Destroy() method gets called. The classic approach would be to create a new class derived from wxWindow that overrides wxWindow::Destroy to first run the custom code and then call the destructor. But how should I do it in wxLua? If I'd derive a whole new class from wxWindow I'd have to create new bindings for it etc. This all sounds quite complicated so I'd to know if there is an easier way to hook into the wxWindow::Destroy method for every wxWindow object created by wxLua. Connecting to wxEVT_DESTROY is probably not sufficient because AFAICS destruction is already in process when this event is sent, but I'd like to run my custom code *before* the destruction process is actually started. Thanks! -- Best regards, Andreas Falkenhahn mailto:an...@fa... |
From: Andreas F. <an...@fa...> - 2013-08-25 10:41:24
|
Hi, I'm experiencing some strange behaviour when trying to print class names of wxWindow objects from the wxLuaWinDestroyCallback constructor and destructors. I think this has to do with my lack of knowledge about C++ so I'd be glad if someone could explain to me why this happens. I added the following three printf()'s to wxlcallb.cpp: 1) In wxLuaWinDestroyCallback::wxLuaWinDestroyCallback: printf("*** CONSTRUCTOR: %p NAME: %s\n", m_window, m_window->GetClassInfo()->GetClassName()); 2) In wxLuaWinDestroyCallback::~wxLuaWinDestroyCallback(): printf("*** DESTRUCTOR: %p NAME: %s\n", m_window, m_window->GetClassInfo()->GetClassName()); 3) In void wxLuaWinDestroyCallback::OnAllDestroyEvents(wxWindowDestroyEvent& event): printf("*** ONALLDESTROY: %p NAME: %s\n", theCallback->m_window, theCallback->m_window->GetClassInfo()->GetClassName()); For wxWindow of type wxFrame I get the following output: *** CONSTRUCTOR: 03C7EE18 NAME: wxFrame *** ONALLDESTROY: 03C7EE18 NAME: wxWindow *** DESTRUCTOR: 03C7EE18 NAME: wxEvtHandler What is confusing me here is this: The m_window pointer is always the same but in each callback I get a different class name. How can this be? I'd expect to get "wxFrame" in each callback but instead I get "wxFrame" only in the constructor. In the other two callbacks it is "wxWindow" and then even "wxEvtHandler".... I don't understand this. What is going on there? Thanks! -- Best regards, Andreas Falkenhahn mailto:an...@fa... |
From: Paul K <pau...@ya...> - 2013-08-23 23:04:08
|
Hi John, > After that wxlua and lua produce the same (calendar) results. You can > also tweak the manifest before embedding it to see the effect. Were you able to reproduce the same effect? Paul. On Mon, Aug 19, 2013 at 8:44 PM, Paul K <pau...@ya...> wrote: > Hi John, > >> I just added a resource and manifest file for wxLua's lua.exe, but it didn't change how the calendar control looked. >> Is there anything that you did differently? > > I went the easy way: I extracted the manifest from wxlua and added it > to lua.exe: > > "C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\mt.exe" > -inputresource:wxlua.exe -out:extracted.manifest > "C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\mt.exe" -manifest > extracted.manifest -outputresource:lua.exe > > After that wxlua and lua produce the same (calendar) results. You can > also tweak the manifest before embedding it to see the effect. > >> I don't know what you mean. What DLL is included with Windows that you ship? > > Not sure; when I tried the same manifest with my wx.dll compiled with > mingw, I get side-by-side error: > > Activation context generation failed for "...zbstudio.exe". Dependent > Assembly Microsoft.Windows.Common-Controls,publicKeyToken="6595b64144ccf1df",type="win32",version="6.0.0.0" > could not be found. > > When I copy all the dlls from 2.8.12 and run with the same executable, > everything is fine. I'm not sure what dll I'm missing, but I thought > it was one of wxmsw28_*vc_custom.dll. > > Paul. > > On Mon, Aug 19, 2013 at 8:06 PM, John Labenski <jla...@gm...> wrote: >> On Mon, Aug 19, 2013 at 12:33 AM, Paul K <pau...@ya...> wrote: >>> >>> > It seems like the required addition to the manifest is quite simple >>> (as per >>> http://msdn.microsoft.com/en-us/library/windows/desktop/bb773175(v=vs.85).aspx): >>> >>> okay, I managed to get my application running with the right manifest >>> (and I'm even using mingw instead of VS). What I mentioned earlier was >>> correct, but I was missing a proper way to reference the manifest. >>> >>> It turned out that the way I included manifest was not correct as my >>> .rc file had "1 RT_MANIFEST zbstudio.manifest" and it should have been >>> "1 24 zbstudio.manifest". After I added the correct reference (and >>> included <dependentAssembly> reference) the manifest was recognized >>> and I could run my application using wxlua 2.8.12 DLLs and could see >>> the expected results. >>> >> >> I just added a resource and manifest file for wxLua's lua.exe, but it didn't >> change how the calendar control looked. >> >> http://sourceforge.net/p/wxlua/svn/190/ >> https://github.com/wxWidgets/wxWidgets/blob/master/include/wx/msw/wx.manifest >> >> Is there anything that you did differently? >> >> >>> >>> Unfortunately, this doesn't really help me as I was hoping to >>> reference a DLL that is included with Windows, rather than ship mine, >>> but maybe this will help others... >>> >> >> I don't know what you mean. What DLL is included with Windows that you ship? >> >> Regards, >> John >> >> >> ------------------------------------------------------------------------------ >> Introducing Performance Central, a new site from SourceForge and >> AppDynamics. Performance Central is your source for news, insights, >> analysis and resources for efficient Application Performance Management. >> Visit us today! >> http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk >> _______________________________________________ >> wxlua-users mailing list >> wxl...@li... >> https://lists.sourceforge.net/lists/listinfo/wxlua-users >> |
From: Paul K <pau...@ya...> - 2013-08-23 06:17:05
|
> Anyone has an example that allows to accept a filename after D&D that works on Windows/OSX/Linux? Nobody knows? John? I'll be happy with any hints I can try... Paul. On Sat, Aug 3, 2013 at 9:11 PM, Paul K <pau...@ya...> wrote: > Hi All, > > I'm trying to make my application accept files that can be dragged on > it. This is what I currently have: > > pcall(function() frame:DragAcceptFiles(true) end) > frame:Connect(wx.wxEVT_DROP_FILES, function(evt) > local files = evt:GetFiles() > -- do something to open files > end) > > This works on Windows, but doesn't work on OSX at all (this is why I > have the call wrapped in pcall) and only copies filename on Linux > (instead of opening the file). > > I read that DragAcceptFiles is deprecated and should be replaced with > drop target processing > (http://wxwidgets.10942.n7.nabble.com/Why-EVT-DROP-FILES-is-not-on-all-wx-ports-td7164.html). > > This is what I'm trying to do: > > local filedo = wx.wxFileDataObject() > local droptarget = wx.wxDropTarget --(filedo) -- doesn't work, see below > function droptarget:OnData(x, y, result) return result end > function droptarget:OnDrop() return true end > frame:SetDropTarget(droptarget) > > SetDropTarget requires wxDropTarget object passed to it, but > wx.wxDropTarget is an empty table and doesn't have "new" method to > construct an object. Also, theer is no wxFileDropTarget (only > wxDropTarget), so I'm not sure how it's supposed to work. I found one > relevant feature request > (http://sourceforge.net/p/wxlua/feature-requests/3/) that was closed > as "fixed", but the Lua code that is in that ticket doesn't work for > me. > > Anyone has an example that allows to accept a filename after D&D that > works on Windows/OSX/Linux? Thank you. > > Paul. |
From: Milind <mil...@gm...> - 2013-08-20 04:04:35
|
Any suggestions anyone? Milind -------- Original message -------- From: Milind Gupta <mil...@gm...> Date: 08/16/2013 4:03 PM (GMT-08:00) To: wxl...@li... Subject: Re: [wxlua-users] Writing equations Hi John, For the equation I am interested in rendering the equation on screen not on evaluating it. Somewhat like a browser renders MathML or these math packages like Mathematica, Maxima or just the equation writer of Microsoft Word. Do you have any pointers for that? Thanks, Milind On Fri, Aug 16, 2013 at 2:52 PM, John Labenski <jla...@gm...> wrote: On Fri, Aug 16, 2013 at 3:21 PM, Milind Gupta <mil...@gm...> wrote: Hi, I am trying to find out if there is an easy way I can add mathematical equation writing support to my page. I have never done this before so any pointers would be helpful. Can I use any existing library with wxlua to achieve this? Or would it be easier to make it from scratch. I have used this library before and it works as advertised : http://warp.povusers.org/FunctionParser/ However, a pure Lua solution is probably what you want and I have not attempted to do that either. I would think that if you get a string from a user then run it through some checks to make sure it doesn't have 'if', 'for', 'os.execute', or any other nastyness, prepend "return" to it then use pcall() to run it that should work. The hard part is getting all the check rights so you don't have any security holes and the user can't crash/lock-up your program. Regards, John ps. I'll check the controls later tonight when I can get to a MS Win machine and respond in your other thread. ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk _______________________________________________ wxlua-users mailing list wxl...@li... https://lists.sourceforge.net/lists/listinfo/wxlua-users |
From: Paul K <pau...@ya...> - 2013-08-20 03:50:13
|
Hi John, > I just added a resource and manifest file for wxLua's lua.exe, but it didn't change how the calendar control looked. > Is there anything that you did differently? Just to clarify: I tried both ways and got it to work. I tried compiling from scratch with zbstudio.exe and I also tried moving manifest from wxlua to lua.exe as I described earlier. For compiling from scratch I used this script: https://github.com/pkulchenko/ZeroBraneStudio/blob/master/build/build-win32.sh#L247-L248 and the files are here: https://github.com/pkulchenko/ZeroBraneStudio/tree/master/zbstudio/res (zbstudio.rc and zbstudio.manifest; this manifest doesn't reference Common-Controls as I couldn't get it to work with my mingw-compiled 2.9.5, but it works with your 2.8.12 dlls). Paul. On Mon, Aug 19, 2013 at 8:44 PM, Paul K <pau...@ya...> wrote: > Hi John, > >> I just added a resource and manifest file for wxLua's lua.exe, but it didn't change how the calendar control looked. >> Is there anything that you did differently? > > I went the easy way: I extracted the manifest from wxlua and added it > to lua.exe: > > "C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\mt.exe" > -inputresource:wxlua.exe -out:extracted.manifest > "C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\mt.exe" -manifest > extracted.manifest -outputresource:lua.exe > > After that wxlua and lua produce the same (calendar) results. You can > also tweak the manifest before embedding it to see the effect. > >> I don't know what you mean. What DLL is included with Windows that you ship? > > Not sure; when I tried the same manifest with my wx.dll compiled with > mingw, I get side-by-side error: > > Activation context generation failed for "...zbstudio.exe". Dependent > Assembly Microsoft.Windows.Common-Controls,publicKeyToken="6595b64144ccf1df",type="win32",version="6.0.0.0" > could not be found. > > When I copy all the dlls from 2.8.12 and run with the same executable, > everything is fine. I'm not sure what dll I'm missing, but I thought > it was one of wxmsw28_*vc_custom.dll. > > Paul. > > On Mon, Aug 19, 2013 at 8:06 PM, John Labenski <jla...@gm...> wrote: >> On Mon, Aug 19, 2013 at 12:33 AM, Paul K <pau...@ya...> wrote: >>> >>> > It seems like the required addition to the manifest is quite simple >>> (as per >>> http://msdn.microsoft.com/en-us/library/windows/desktop/bb773175(v=vs.85).aspx): >>> >>> okay, I managed to get my application running with the right manifest >>> (and I'm even using mingw instead of VS). What I mentioned earlier was >>> correct, but I was missing a proper way to reference the manifest. >>> >>> It turned out that the way I included manifest was not correct as my >>> .rc file had "1 RT_MANIFEST zbstudio.manifest" and it should have been >>> "1 24 zbstudio.manifest". After I added the correct reference (and >>> included <dependentAssembly> reference) the manifest was recognized >>> and I could run my application using wxlua 2.8.12 DLLs and could see >>> the expected results. >>> >> >> I just added a resource and manifest file for wxLua's lua.exe, but it didn't >> change how the calendar control looked. >> >> http://sourceforge.net/p/wxlua/svn/190/ >> https://github.com/wxWidgets/wxWidgets/blob/master/include/wx/msw/wx.manifest >> >> Is there anything that you did differently? >> >> >>> >>> Unfortunately, this doesn't really help me as I was hoping to >>> reference a DLL that is included with Windows, rather than ship mine, >>> but maybe this will help others... >>> >> >> I don't know what you mean. What DLL is included with Windows that you ship? >> >> Regards, >> John >> >> >> ------------------------------------------------------------------------------ >> Introducing Performance Central, a new site from SourceForge and >> AppDynamics. Performance Central is your source for news, insights, >> analysis and resources for efficient Application Performance Management. >> Visit us today! >> http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk >> _______________________________________________ >> wxlua-users mailing list >> wxl...@li... >> https://lists.sourceforge.net/lists/listinfo/wxlua-users >> |
From: Paul K <pau...@ya...> - 2013-08-20 03:44:49
|
Hi John, > I just added a resource and manifest file for wxLua's lua.exe, but it didn't change how the calendar control looked. > Is there anything that you did differently? I went the easy way: I extracted the manifest from wxlua and added it to lua.exe: "C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\mt.exe" -inputresource:wxlua.exe -out:extracted.manifest "C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\mt.exe" -manifest extracted.manifest -outputresource:lua.exe After that wxlua and lua produce the same (calendar) results. You can also tweak the manifest before embedding it to see the effect. > I don't know what you mean. What DLL is included with Windows that you ship? Not sure; when I tried the same manifest with my wx.dll compiled with mingw, I get side-by-side error: Activation context generation failed for "...zbstudio.exe". Dependent Assembly Microsoft.Windows.Common-Controls,publicKeyToken="6595b64144ccf1df",type="win32",version="6.0.0.0" could not be found. When I copy all the dlls from 2.8.12 and run with the same executable, everything is fine. I'm not sure what dll I'm missing, but I thought it was one of wxmsw28_*vc_custom.dll. Paul. On Mon, Aug 19, 2013 at 8:06 PM, John Labenski <jla...@gm...> wrote: > On Mon, Aug 19, 2013 at 12:33 AM, Paul K <pau...@ya...> wrote: >> >> > It seems like the required addition to the manifest is quite simple >> (as per >> http://msdn.microsoft.com/en-us/library/windows/desktop/bb773175(v=vs.85).aspx): >> >> okay, I managed to get my application running with the right manifest >> (and I'm even using mingw instead of VS). What I mentioned earlier was >> correct, but I was missing a proper way to reference the manifest. >> >> It turned out that the way I included manifest was not correct as my >> .rc file had "1 RT_MANIFEST zbstudio.manifest" and it should have been >> "1 24 zbstudio.manifest". After I added the correct reference (and >> included <dependentAssembly> reference) the manifest was recognized >> and I could run my application using wxlua 2.8.12 DLLs and could see >> the expected results. >> > > I just added a resource and manifest file for wxLua's lua.exe, but it didn't > change how the calendar control looked. > > http://sourceforge.net/p/wxlua/svn/190/ > https://github.com/wxWidgets/wxWidgets/blob/master/include/wx/msw/wx.manifest > > Is there anything that you did differently? > > >> >> Unfortunately, this doesn't really help me as I was hoping to >> reference a DLL that is included with Windows, rather than ship mine, >> but maybe this will help others... >> > > I don't know what you mean. What DLL is included with Windows that you ship? > > Regards, > John > > > ------------------------------------------------------------------------------ > Introducing Performance Central, a new site from SourceForge and > AppDynamics. Performance Central is your source for news, insights, > analysis and resources for efficient Application Performance Management. > Visit us today! > http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk > _______________________________________________ > wxlua-users mailing list > wxl...@li... > https://lists.sourceforge.net/lists/listinfo/wxlua-users > |
From: John L. <jla...@gm...> - 2013-08-20 03:06:18
|
On Mon, Aug 19, 2013 at 12:33 AM, Paul K <pau...@ya...> wrote: > > It seems like the required addition to the manifest is quite simple > (as per > http://msdn.microsoft.com/en-us/library/windows/desktop/bb773175(v=vs.85).aspx > ): > > okay, I managed to get my application running with the right manifest > (and I'm even using mingw instead of VS). What I mentioned earlier was > correct, but I was missing a proper way to reference the manifest. > > It turned out that the way I included manifest was not correct as my > .rc file had "1 RT_MANIFEST zbstudio.manifest" and it should have been > "1 24 zbstudio.manifest". After I added the correct reference (and > included <dependentAssembly> reference) the manifest was recognized > and I could run my application using wxlua 2.8.12 DLLs and could see > the expected results. > > I just added a resource and manifest file for wxLua's lua.exe, but it didn't change how the calendar control looked. http://sourceforge.net/p/wxlua/svn/190/ https://github.com/wxWidgets/wxWidgets/blob/master/include/wx/msw/wx.manifest Is there anything that you did differently? > Unfortunately, this doesn't really help me as I was hoping to > reference a DLL that is included with Windows, rather than ship mine, > but maybe this will help others... > > I don't know what you mean. What DLL is included with Windows that you ship? Regards, John |
From: Paul K <pau...@ya...> - 2013-08-19 04:33:10
|
> It seems like the required addition to the manifest is quite simple (as per http://msdn.microsoft.com/en-us/library/windows/desktop/bb773175(v=vs.85).aspx): okay, I managed to get my application running with the right manifest (and I'm even using mingw instead of VS). What I mentioned earlier was correct, but I was missing a proper way to reference the manifest. It turned out that the way I included manifest was not correct as my .rc file had "1 RT_MANIFEST zbstudio.manifest" and it should have been "1 24 zbstudio.manifest". After I added the correct reference (and included <dependentAssembly> reference) the manifest was recognized and I could run my application using wxlua 2.8.12 DLLs and could see the expected results. Unfortunately, this doesn't really help me as I was hoping to reference a DLL that is included with Windows, rather than ship mine, but maybe this will help others... Paul. On Sun, Aug 18, 2013 at 7:58 PM, Paul K <pau...@ya...> wrote: > I'm very interested in what manifest needs to be used as well. My > executable *does* include a manifest, but it doesn't statically > compile wx.dll and loads it at run-time. My calendar looks like a > generic one (the one that Milind has on the left side), so I either > need to have a different content in the manifest or needs to include > in the DLL file itself. > > It seems like the required addition to the manifest is quite simple > (as per http://msdn.microsoft.com/en-us/library/windows/desktop/bb773175(v=vs.85).aspx): > > <dependency> > <dependentAssembly> > <assemblyIdentity > type="win32" > name="Microsoft.Windows.Common-Controls" > version="6.0.0.0" > /> > </dependentAssembly> > </dependency> > > I added it to my executable, but the controls are still shown as "generic" ones. > > I also removed this part of the manifest from wxlua and it indeed > turned the "native" controls into "generic" ones. It seems like this > is what is missing from the lua.exe file, but I'm not sure (yet) why > it's not working in my case... > > Paul. > > On Sun, Aug 18, 2013 at 6:34 PM, Milind Gupta <mil...@gm...> wrote: >> Thanks John for putting time on this. When I posted this question on >> wxWidgets (http://forums.wxwidgets.org/viewtopic.php?f=23&t=37587) they also >> said about the manifest file. I didn't explore it further from there. >> But would not the manifest file not compiled with the wx.dll itself >> why would Lua need to be compiled with it? >> >> Thanks, >> Milind >> >> >> >> >> On Sat, Aug 17, 2013 at 9:07 PM, John Labenski <jla...@gm...> wrote: >>> >>> On Fri, Aug 16, 2013 at 3:16 PM, Milind Gupta <mil...@gm...> >>> wrote: >>>> >>>> >>>> So when you do this do you get the same differences or is it just >>>> something on my system? Since these are run from the same Lua package but >>>> show different renderings I am really curious why this happens. >>>> >>> >>> Hummm, I do see the same differences you do and I get the same results >>> even when I compile it fresh using MSVC 2008 (the sourceforge packages were >>> built with MSVC 6). >>> >>> I ran depends[1] on them and found that they all use the exact same DLLs >>> except for these differences : >>> >>> They both use these two DLLS (note I built using 64-bit arch) >>> >>> c:\windows\winsxs\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9200.16579_none_418ab7ef718b27ef\COMCTL32.DLL >>> >>> c:\windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9200.16579_none_8937eec6860750f5\COMCTL32.DLL >>> >>> wx.dll also uses this which is older and that may explain the older >>> looking calendar control. >>> >>> c:\windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.9200.16384_none_bf100cd445f4d954\COMCTL32.DLL >>> >>> I believe it has something to do with the manifest file, lua.exe is not >>> compiled with one, but all the wxLua apps use the wxWidget manifest file. >>> >>> http://msdn.microsoft.com/en-us/library/windows/desktop/bb773175%28v=vs.85%29.aspx >>> >>> I suppose I could try building lua.exe using a similar manifest file and >>> see if that changes anything. >>> >>> Regards, >>> John >>> >>> >>> [1] http://www.dependencywalker.com/ >>> >>> >>> ------------------------------------------------------------------------------ >>> Get 100% visibility into Java/.NET code with AppDynamics Lite! >>> It's a free troubleshooting tool designed for production. >>> Get down to code-level detail for bottlenecks, with <2% overhead. >>> Download for free and get started troubleshooting in minutes. >>> >>> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk >>> _______________________________________________ >>> wxlua-users mailing list >>> wxl...@li... >>> https://lists.sourceforge.net/lists/listinfo/wxlua-users >>> >> >> >> ------------------------------------------------------------------------------ >> Get 100% visibility into Java/.NET code with AppDynamics Lite! >> It's a free troubleshooting tool designed for production. >> Get down to code-level detail for bottlenecks, with <2% overhead. >> Download for free and get started troubleshooting in minutes. >> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk >> _______________________________________________ >> wxlua-users mailing list >> wxl...@li... >> https://lists.sourceforge.net/lists/listinfo/wxlua-users >> |
From: John L. <jla...@gm...> - 2013-08-19 04:05:09
|
On Sun, Aug 18, 2013 at 10:58 PM, Paul K <pau...@ya...> wrote: > I'm very interested in what manifest needs to be used as well. My > executable *does* include a manifest, but it doesn't statically > compile wx.dll and loads it at run-time. My calendar looks like a > generic one (the one that Milind has on the left side), so I either > need to have a different content in the manifest or needs to include > in the DLL file itself. > > I too have tried to add an appropriate mainifest file to lua.exe and found that it didn't change anything. Note that wx.dll already uses the same resource file as wxlua.exe, but I think that the manifest file only matters for the exe. If anyone can find out how to fix this I will happily add it to wxLua. Regards, John |
From: Paul K <pau...@ya...> - 2013-08-19 02:58:18
|
I'm very interested in what manifest needs to be used as well. My executable *does* include a manifest, but it doesn't statically compile wx.dll and loads it at run-time. My calendar looks like a generic one (the one that Milind has on the left side), so I either need to have a different content in the manifest or needs to include in the DLL file itself. It seems like the required addition to the manifest is quite simple (as per http://msdn.microsoft.com/en-us/library/windows/desktop/bb773175(v=vs.85).aspx): <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" /> </dependentAssembly> </dependency> I added it to my executable, but the controls are still shown as "generic" ones. I also removed this part of the manifest from wxlua and it indeed turned the "native" controls into "generic" ones. It seems like this is what is missing from the lua.exe file, but I'm not sure (yet) why it's not working in my case... Paul. On Sun, Aug 18, 2013 at 6:34 PM, Milind Gupta <mil...@gm...> wrote: > Thanks John for putting time on this. When I posted this question on > wxWidgets (http://forums.wxwidgets.org/viewtopic.php?f=23&t=37587) they also > said about the manifest file. I didn't explore it further from there. > But would not the manifest file not compiled with the wx.dll itself > why would Lua need to be compiled with it? > > Thanks, > Milind > > > > > On Sat, Aug 17, 2013 at 9:07 PM, John Labenski <jla...@gm...> wrote: >> >> On Fri, Aug 16, 2013 at 3:16 PM, Milind Gupta <mil...@gm...> >> wrote: >>> >>> >>> So when you do this do you get the same differences or is it just >>> something on my system? Since these are run from the same Lua package but >>> show different renderings I am really curious why this happens. >>> >> >> Hummm, I do see the same differences you do and I get the same results >> even when I compile it fresh using MSVC 2008 (the sourceforge packages were >> built with MSVC 6). >> >> I ran depends[1] on them and found that they all use the exact same DLLs >> except for these differences : >> >> They both use these two DLLS (note I built using 64-bit arch) >> >> c:\windows\winsxs\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9200.16579_none_418ab7ef718b27ef\COMCTL32.DLL >> >> c:\windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9200.16579_none_8937eec6860750f5\COMCTL32.DLL >> >> wx.dll also uses this which is older and that may explain the older >> looking calendar control. >> >> c:\windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.9200.16384_none_bf100cd445f4d954\COMCTL32.DLL >> >> I believe it has something to do with the manifest file, lua.exe is not >> compiled with one, but all the wxLua apps use the wxWidget manifest file. >> >> http://msdn.microsoft.com/en-us/library/windows/desktop/bb773175%28v=vs.85%29.aspx >> >> I suppose I could try building lua.exe using a similar manifest file and >> see if that changes anything. >> >> Regards, >> John >> >> >> [1] http://www.dependencywalker.com/ >> >> >> ------------------------------------------------------------------------------ >> Get 100% visibility into Java/.NET code with AppDynamics Lite! >> It's a free troubleshooting tool designed for production. >> Get down to code-level detail for bottlenecks, with <2% overhead. >> Download for free and get started troubleshooting in minutes. >> >> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk >> _______________________________________________ >> wxlua-users mailing list >> wxl...@li... >> https://lists.sourceforge.net/lists/listinfo/wxlua-users >> > > > ------------------------------------------------------------------------------ > Get 100% visibility into Java/.NET code with AppDynamics Lite! > It's a free troubleshooting tool designed for production. > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk > _______________________________________________ > wxlua-users mailing list > wxl...@li... > https://lists.sourceforge.net/lists/listinfo/wxlua-users > |
From: Milind G. <mil...@gm...> - 2013-08-19 01:34:54
|
Thanks John for putting time on this. When I posted this question on wxWidgets (http://forums.wxwidgets.org/viewtopic.php?f=23&t=37587) they also said about the manifest file. I didn't explore it further from there. But would not the manifest file not compiled with the wx.dll itself why would Lua need to be compiled with it? Thanks, Milind On Sat, Aug 17, 2013 at 9:07 PM, John Labenski <jla...@gm...> wrote: > On Fri, Aug 16, 2013 at 3:16 PM, Milind Gupta <mil...@gm...>wrote: > >> >> So when you do this do you get the same differences or is it just >> something on my system? Since these are run from the same Lua package but >> show different renderings I am really curious why this happens. >> >> > Hummm, I do see the same differences you do and I get the same results > even when I compile it fresh using MSVC 2008 (the sourceforge packages were > built with MSVC 6). > > I ran depends[1] on them and found that they all use the exact same DLLs > except for these differences : > > They both use these two DLLS (note I built using 64-bit arch) > > c:\windows\winsxs\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9200.16579_none_418ab7ef718b27ef\COMCTL32.DLL > > c:\windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9200.16579_none_8937eec6860750f5\COMCTL32.DLL > > wx.dll also uses this which is older and that may explain the older > looking calendar control. > > c:\windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.9200.16384_none_bf100cd445f4d954\COMCTL32.DLL > > I believe it has something to do with the manifest file, lua.exe is not > compiled with one, but all the wxLua apps use the wxWidget manifest file. > > http://msdn.microsoft.com/en-us/library/windows/desktop/bb773175%28v=vs.85%29.aspx > > I suppose I could try building lua.exe using a similar manifest file and > see if that changes anything. > > Regards, > John > > > [1] http://www.dependencywalker.com/ > > > ------------------------------------------------------------------------------ > Get 100% visibility into Java/.NET code with AppDynamics Lite! > It's a free troubleshooting tool designed for production. > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk > _______________________________________________ > wxlua-users mailing list > wxl...@li... > https://lists.sourceforge.net/lists/listinfo/wxlua-users > > |
From: John L. <jla...@gm...> - 2013-08-18 04:07:29
|
On Fri, Aug 16, 2013 at 3:16 PM, Milind Gupta <mil...@gm...>wrote: > > So when you do this do you get the same differences or is it just > something on my system? Since these are run from the same Lua package but > show different renderings I am really curious why this happens. > > Hummm, I do see the same differences you do and I get the same results even when I compile it fresh using MSVC 2008 (the sourceforge packages were built with MSVC 6). I ran depends[1] on them and found that they all use the exact same DLLs except for these differences : They both use these two DLLS (note I built using 64-bit arch) c:\windows\winsxs\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9200.16579_none_418ab7ef718b27ef\COMCTL32.DLL c:\windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9200.16579_none_8937eec6860750f5\COMCTL32.DLL wx.dll also uses this which is older and that may explain the older looking calendar control. c:\windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.9200.16384_none_bf100cd445f4d954\COMCTL32.DLL I believe it has something to do with the manifest file, lua.exe is not compiled with one, but all the wxLua apps use the wxWidget manifest file. http://msdn.microsoft.com/en-us/library/windows/desktop/bb773175%28v=vs.85%29.aspx I suppose I could try building lua.exe using a similar manifest file and see if that changes anything. Regards, John [1] http://www.dependencywalker.com/ |
From: Milind G. <mil...@gm...> - 2013-08-16 23:03:34
|
Hi John, For the equation I am interested in rendering the equation on screen not on evaluating it. Somewhat like a browser renders MathML or these math packages like Mathematica, Maxima or just the equation writer of Microsoft Word. Do you have any pointers for that? Thanks, Milind On Fri, Aug 16, 2013 at 2:52 PM, John Labenski <jla...@gm...> wrote: > On Fri, Aug 16, 2013 at 3:21 PM, Milind Gupta <mil...@gm...>wrote: > >> Hi, >> I am trying to find out if there is an easy way I can add >> mathematical equation writing support to my page. I have never done this >> before so any pointers would be helpful. Can I use any existing library >> with wxlua to achieve this? Or would it be easier to make it from scratch. >> >> > I have used this library before and it works as advertised : > http://warp.povusers.org/FunctionParser/ > > However, a pure Lua solution is probably what you want and I have not > attempted to do that either. I would think that if you get a string from a > user then run it through some checks to make sure it doesn't have 'if', > 'for', 'os.execute', or any other nastyness, prepend "return" to it then > use pcall() to run it that should work. The hard part is getting all the > check rights so you don't have any security holes and the user can't > crash/lock-up your program. > > Regards, > John > > > ps. I'll check the controls later tonight when I can get to a MS Win > machine and respond in your other thread. > > > > ------------------------------------------------------------------------------ > Get 100% visibility into Java/.NET code with AppDynamics Lite! > It's a free troubleshooting tool designed for production. > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk > _______________________________________________ > wxlua-users mailing list > wxl...@li... > https://lists.sourceforge.net/lists/listinfo/wxlua-users > > |
From: John L. <jla...@gm...> - 2013-08-16 21:53:03
|
On Fri, Aug 16, 2013 at 3:21 PM, Milind Gupta <mil...@gm...>wrote: > Hi, > I am trying to find out if there is an easy way I can add > mathematical equation writing support to my page. I have never done this > before so any pointers would be helpful. Can I use any existing library > with wxlua to achieve this? Or would it be easier to make it from scratch. > > I have used this library before and it works as advertised : http://warp.povusers.org/FunctionParser/ However, a pure Lua solution is probably what you want and I have not attempted to do that either. I would think that if you get a string from a user then run it through some checks to make sure it doesn't have 'if', 'for', 'os.execute', or any other nastyness, prepend "return" to it then use pcall() to run it that should work. The hard part is getting all the check rights so you don't have any security holes and the user can't crash/lock-up your program. Regards, John ps. I'll check the controls later tonight when I can get to a MS Win machine and respond in your other thread. |
From: John L. <jla...@gm...> - 2013-08-16 19:44:53
|
On Fri, Aug 16, 2013 at 10:26 AM, Victor Bombi <so...@te...>wrote: > solved replacing render: > function render() > local dc = wx.wxPaintDC(canvas) > canvas:SetCurrent(context) > Yes you must use a wxPaintDC here, see below. canvas:SwapBuffers() > dc:delete() > end > > > > But in both cases it happens the same > > application is not responsive you can only do ctrl-C and crash > > > You must always create a wxPaintDC for the window you set a wxEVT_PAINT callback for. This is because the wxPaintDC clears the "damaged" area set by the OS, if you don't create a wxPaintDC the OS will call your paint handler endlessly trying to get your app to repaint itself. See here for a little more info. http://docs.wxwidgets.org/trunk/classwx_paint_event.html I believe that creating a wxPaintDC is not strictly required in Linux which is perhaps why the original code worked for its author. http://luagl.sourceforge.net/examples/glcanvas.wx.lua Regards, John |
From: Milind G. <mil...@gm...> - 2013-08-16 19:21:59
|
Hi, I am trying to find out if there is an easy way I can add mathematical equation writing support to my page. I have never done this before so any pointers would be helpful. Can I use any existing library with wxlua to achieve this? Or would it be easier to make it from scratch. Thanks, Milind |
From: Victor B. <so...@te...> - 2013-08-16 14:26:17
|
solved replacing render: function render() local dc = wx.wxPaintDC(canvas) canvas:SetCurrent(context) gl.ClearColor(0, 0, 0, 0) gl.Clear(gl.COLOR_BUFFER_BIT) gl.Begin('TRIANGLES') gl.Vertex( 0, 0.75, 0) gl.Vertex(-0.75, -0.75, 0) gl.Vertex( 0.75, -0.75, 0) gl.End() canvas:SwapBuffers() dc:delete() end ----- Original Message ----- From: "Victor Bombi" <so...@te...> To: <wxl...@li...> Sent: Friday, August 16, 2013 3:29 PM Subject: [wxlua-users] wxGLCanvas > Hello, > > this is the sample that comes with luagl for using it with wxlua. >>From the docs it seems that should be called: > wx.wxGLCanvas(frame, wx.wxID_ANY, {},wx.wxDefaultPosition, > wx.wxDefaultSize, > wx.wxEXPAND) > instead of: > wx.wxGLCanvas(frame, wx.wxID_ANY,wx.wxDefaultPosition, wx.wxDefaultSize, > wx.wxEXPAND) > to get a canvas without a glcontext > > But in both cases it happens the same > application is not responsive you can only do ctrl-C and crash > > Is there another example anywhere? > Somethig should be changed? > > best > victor bombi > > > ----------------------------------------------------------------------------- > -- Name: glcanvas.wx.lua > -- Purpose: wxLua and LuaGL sample > -- Author: Tin Benjamin Matuka > -- Created: 31/01/2011 > -- Copyright: (c) 2011 Tin Benjamin Matuka. All rights reserved. > -- Licence: Public Domain > -- Comment: I only left in comments for code that deals with making > -- wxLua and LuaGL interact > ----------------------------------------------------------------------------- > package.cpath = > package.cpath..";./?.dll;./?.so;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;/usr/lib/lua/5.1/?.so;" > require("wx") > require("luagl") > function render() > context:SetCurrent(canvas) > gl.ClearColor(0, 0, 0, 0) > gl.Clear(gl.COLOR_BUFFER_BIT) > gl.Begin('TRIANGLES') > gl.Vertex( 0, 0.75, 0) > gl.Vertex(-0.75, -0.75, 0) > gl.Vertex( 0.75, -0.75, 0) > gl.End() > canvas:SwapBuffers() > end > frame = nil > frame = wx.wxFrame( wx.NULL, wx.wxID_ANY, "wxLua + LuaGL Demo", > wx.wxDefaultPosition, wx.wxSize(450, 450), wx.wxDEFAULT_FRAME_STYLE ) > local fileMenu = wx.wxMenu() > fileMenu:Append(wx.wxID_EXIT, "E&xit", "Quit the program") > local helpMenu = wx.wxMenu() > helpMenu:Append(wx.wxID_ABOUT, "&About", "About the wxLua + LuaGL Demo") > local menuBar = wx.wxMenuBar() > menuBar:Append(fileMenu, "&File") > menuBar:Append(helpMenu, "&Help") > frame:SetMenuBar(menuBar) > frame:CreateStatusBar(1) > frame:SetStatusText("Welcome to wxLua + LuaGL Demo.") > frame:Connect(wx.wxID_EXIT, wx.wxEVT_COMMAND_MENU_SELECTED, > function (event) frame:Close(true) end ) > frame:Connect(wx.wxID_ABOUT, wx.wxEVT_COMMAND_MENU_SELECTED, > function (event) > wx.wxMessageBox('wxLua + LuaGL Demo.\n'.. > 'Written by Tin Benjamin Matuka\n'.. > 'www.sh1fty.com', > "About wxLua + LuaGL Demo", > wx.wxOK + wx.wxICON_INFORMATION, > frame) > end ) > -- This is where the GLCanvas is created > canvas = wx.wxGLCanvas(frame, wx.wxID_ANY, wx.wxDefaultPosition, > wx.wxDefaultSize, wx.wxEXPAND) > -- A GLContext is created > context = wx.wxGLContext(canvas) > -- Connect the PAINT event to the render function > canvas:Connect(wx.wxEVT_PAINT, render) > -- Refresh the canvas so that it gets properly resized and rendered. > canvas:Refresh() > frame:Show(true) > wx.wxGetApp():MainLoop() > > > ------------------------------------------------------------------------------ > Get 100% visibility into Java/.NET code with AppDynamics Lite! > It's a free troubleshooting tool designed for production. > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk > _______________________________________________ > wxlua-users mailing list > wxl...@li... > https://lists.sourceforge.net/lists/listinfo/wxlua-users |
From: Victor B. <so...@te...> - 2013-08-16 13:29:25
|
Hello, this is the sample that comes with luagl for using it with wxlua. >From the docs it seems that should be called: wx.wxGLCanvas(frame, wx.wxID_ANY, {},wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxEXPAND) instead of: wx.wxGLCanvas(frame, wx.wxID_ANY,wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxEXPAND) to get a canvas without a glcontext But in both cases it happens the same application is not responsive you can only do ctrl-C and crash Is there another example anywhere? Somethig should be changed? best victor bombi ----------------------------------------------------------------------------- -- Name: glcanvas.wx.lua -- Purpose: wxLua and LuaGL sample -- Author: Tin Benjamin Matuka -- Created: 31/01/2011 -- Copyright: (c) 2011 Tin Benjamin Matuka. All rights reserved. -- Licence: Public Domain -- Comment: I only left in comments for code that deals with making -- wxLua and LuaGL interact ----------------------------------------------------------------------------- package.cpath = package.cpath..";./?.dll;./?.so;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;/usr/lib/lua/5.1/?.so;" require("wx") require("luagl") function render() context:SetCurrent(canvas) gl.ClearColor(0, 0, 0, 0) gl.Clear(gl.COLOR_BUFFER_BIT) gl.Begin('TRIANGLES') gl.Vertex( 0, 0.75, 0) gl.Vertex(-0.75, -0.75, 0) gl.Vertex( 0.75, -0.75, 0) gl.End() canvas:SwapBuffers() end frame = nil frame = wx.wxFrame( wx.NULL, wx.wxID_ANY, "wxLua + LuaGL Demo", wx.wxDefaultPosition, wx.wxSize(450, 450), wx.wxDEFAULT_FRAME_STYLE ) local fileMenu = wx.wxMenu() fileMenu:Append(wx.wxID_EXIT, "E&xit", "Quit the program") local helpMenu = wx.wxMenu() helpMenu:Append(wx.wxID_ABOUT, "&About", "About the wxLua + LuaGL Demo") local menuBar = wx.wxMenuBar() menuBar:Append(fileMenu, "&File") menuBar:Append(helpMenu, "&Help") frame:SetMenuBar(menuBar) frame:CreateStatusBar(1) frame:SetStatusText("Welcome to wxLua + LuaGL Demo.") frame:Connect(wx.wxID_EXIT, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) frame:Close(true) end ) frame:Connect(wx.wxID_ABOUT, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) wx.wxMessageBox('wxLua + LuaGL Demo.\n'.. 'Written by Tin Benjamin Matuka\n'.. 'www.sh1fty.com', "About wxLua + LuaGL Demo", wx.wxOK + wx.wxICON_INFORMATION, frame) end ) -- This is where the GLCanvas is created canvas = wx.wxGLCanvas(frame, wx.wxID_ANY, wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxEXPAND) -- A GLContext is created context = wx.wxGLContext(canvas) -- Connect the PAINT event to the render function canvas:Connect(wx.wxEVT_PAINT, render) -- Refresh the canvas so that it gets properly resized and rendered. canvas:Refresh() frame:Show(true) wx.wxGetApp():MainLoop() |
From: John L. <jla...@gm...> - 2013-08-16 03:00:43
|
On Thu, Aug 15, 2013 at 12:04 PM, Andreas Falkenhahn <an...@fa... > wrote: > > I think there is a bug in wxlua_getBindMethodArgsMsg(). Try the following > code: > > Yes and thanks for the fix! I really appreciate these. Regards, John |
From: John L. <jla...@gm...> - 2013-08-16 02:16:14
|
On Thu, Aug 15, 2013 at 8:59 AM, Andreas Falkenhahn <an...@fa...>wrote: > Hi, > > I noticed that the second method of wxImage::GetAlpha() is missing. AFAICS > wxLua > only has the first one. So I've quickly adapted this for wxLua. Here's the > code in > case you want to merge this with the official branch: > Thanks! I really appreciate these patches. > I'm not sure if the wxluatype_NULL return is consistent with wxLua's > standard. > What is the function expected to return if wxImage::GetAlpha() returns > NULL? > Currently it returns wx.NULL but of course it could also be made to return > NIL, > an empty string, or even nothing here.... not sure how wxLua is supposed to > behave in this case. > > I made it return nil since that's probably more natural. Regards, John |
From: Andreas F. <an...@fa...> - 2013-08-15 16:04:28
|
Hi, I think there is a bug in wxlua_getBindMethodArgsMsg(). Try the following code: test = wx.wxImage(1) This will raise an error because there is no constructor that just takes a single number. wxLua then shows the following error message: Error: Lua: Error while running chunk [string "untitled.lua*"]:1: wxLua: Function call has invalid argument 1 on method 05. Function called: 'wxImage(number)' 01. wxImage::wxImage(wxBitmap) 02. wxImage::wxImage(number, number [, string, boolean]) 03. wxImage::wxImage([string, number]) 04. wxImage::wxImage(number [, number, boolean]) 05. wxImage::wxImage(wxImage) 06. wxImage::wxImage() stack traceback: [C]: in function 'wxImage' [string "untitled.lua*"]:1: in main chunk Here you can see that the syntax of the single constructors is not shown correctly because the '[' bracket that indicates the beginning of the optional arguments section is always inserted one argument too early. This is caused by a wrong condition in wxlua_getBindMethodArgsMsg(). Precisely, this line if ((wxluacfuncs[i].minargs < wxluacfuncs[i].maxargs) && (arg+1 == wxluacfuncs[i].minargs)) has to be changed into this line if ((wxluacfuncs[i].minargs < wxluacfuncs[i].maxargs) && (arg == wxluacfuncs[i].minargs)) Then the output is correct: 01. wxImage::wxImage(wxBitmap) 02. wxImage::wxImage(number, number, string [, boolean]) 03. wxImage::wxImage(string [, number]) 04. wxImage::wxImage(number , number [, boolean]) 05. wxImage::wxImage(wxImage) 06. wxImage::wxImage() -- Best regards, Andreas Falkenhahn mailto:an...@fa... |
From: Andreas F. <an...@fa...> - 2013-08-15 12:58:44
|
Hi, I noticed that the second method of wxImage::GetAlpha() is missing. AFAICS wxLua only has the first one. So I've quickly adapted this for wxLua. Here's the code in case you want to merge this with the official branch: This goes to bindings/wxwidgets/wxcore_image.i: // %override [Lua string] wxImage::GetAlpha() const; // C++ Func: unsigned char* GetAlpha() const; %override_name wxLua_wxImage_GetAlphaData unsigned char* GetAlpha() const; And this goes to bindings/wxwidgets/wxcore_override.hpp: %override wxLua_wxImage_GetAlphaData // unsigned char* GetAlpha() const static int LUACALL wxLua_wxImage_GetAlphaData(lua_State *L) { // get this wxImage * self = (wxImage *)wxluaT_getuserdatatype(L, 1, wxluatype_wxImage); // call GetAlpha char* returns = (char*)self->GetAlpha(); if(returns) { // push the result pointer lua_pushlstring(L, returns, self->GetWidth()*self->GetHeight()); } else { wxluaT_pushuserdatatype(L, NULL, wxluatype_NULL, true, true); } return 1; } %end I'm not sure if the wxluatype_NULL return is consistent with wxLua's standard. What is the function expected to return if wxImage::GetAlpha() returns NULL? Currently it returns wx.NULL but of course it could also be made to return NIL, an empty string, or even nothing here.... not sure how wxLua is supposed to behave in this case. -- Best regards, Andreas Falkenhahn mailto:an...@fa... |