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: Milind G. <mil...@gm...> - 2012-02-21 21:09:06
|
I tried bindings.wx.lua and that shows the listing fine on the main window. I then changed listCtrl in my example from wxListCtrl to wxListView and I still did not see anything so I need to look into the differences between bindings and the minimal listing I sent earlier. If you have any suggestions do let me know. Thanks, Milind On Tue, Feb 21, 2012 at 12:41 PM, John Labenski <jla...@gm...> wrote: > On Tue, Feb 21, 2012 at 2:26 PM, Milind Gupta <mil...@gm...> > wrote: > > Hi John, > > Thanks for the reply. I created a minimal example (attached and > > pasted). This example works fine in windows but doesn't show anything in > > Linux. Also another thing I noticed in my original program is that when > the > > GUI is shown the list Controls in which I have added a lot of elements > show > > scroll bars also! But no elements are visible. > > This sounds odd, something very strange is going on. Can you select > these hidden items? Is it a matter of having the text the same color > as the background? Maybe as a theme setting? > > When you run the samples/bindings.wx.lua program does it work? You > should see a wxListControl (actually a wxListView, but they're the > same, the wxListView is derived and has a couple extra methods added) > with about 20 items and if you click them you get a new list. > > I don't have access to a Linux machine right now, but I know that the > bindings.wx.lua sample works in RedHat 6, Mandriva 2011, and Fedora 13 > and 15. I see that it adds items exactly as you do as well. > > Regards, > John > > > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > _______________________________________________ > wxlua-users mailing list > wxl...@li... > https://lists.sourceforge.net/lists/listinfo/wxlua-users > |
From: John L. <jla...@gm...> - 2012-02-21 20:41:34
|
On Tue, Feb 21, 2012 at 2:26 PM, Milind Gupta <mil...@gm...> wrote: > Hi John, > Thanks for the reply. I created a minimal example (attached and > pasted). This example works fine in windows but doesn't show anything in > Linux. Also another thing I noticed in my original program is that when the > GUI is shown the list Controls in which I have added a lot of elements show > scroll bars also! But no elements are visible. This sounds odd, something very strange is going on. Can you select these hidden items? Is it a matter of having the text the same color as the background? Maybe as a theme setting? When you run the samples/bindings.wx.lua program does it work? You should see a wxListControl (actually a wxListView, but they're the same, the wxListView is derived and has a couple extra methods added) with about 20 items and if you click them you get a new list. I don't have access to a Linux machine right now, but I know that the bindings.wx.lua sample works in RedHat 6, Mandriva 2011, and Fedora 13 and 15. I see that it adds items exactly as you do as well. Regards, John |
From: Milind G. <mil...@gm...> - 2012-02-21 19:26:23
|
Hi John, Thanks for the reply. I created a minimal example (attached and pasted). This example works fine in windows but doesn't show anything in Linux. Also another thing I noticed in my original program is that when the GUI is shown the list Controls in which I have added a lot of elements show scroll bars also! But no elements are visible. ------------------------------------------------------------------------------------------------------------------------------ -- Load the wxLua module, does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit package.cpath = package.cpath..";./?.dll;./?.so;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;" require("wx") frame = nil -- Create a function to encapulate the code, not necessary, but it makes it -- easier to debug in some cases. function main() -- create the wxFrame window frame = wx.wxFrame( wx.NULL, -- no parent for toplevel windows wx.wxID_ANY, -- don't need a wxWindow ID "wxLua Minimal Demo", -- caption on the frame wx.wxDefaultPosition, -- let system place the frame wx.wxSize(450, 450), -- set the size of the frame wx.wxDEFAULT_FRAME_STYLE ) -- use default frame styles local sizer = wx.wxBoxSizer(wx.wxHORIZONTAL) local listCtrl = wx.wxListCtrl(frame, wx.wxID_ANY, wx.wxDefaultPosition, wx.wxDefaultSize,bit.bor(wx.wxLC_REPORT,wx.wxLC_NO_HEADER)) -- Add Item local col = wx.wxListItem() col:SetId(0) listCtrl:InsertColumn(0,col) local newItem = wx.wxListItem() newItem:SetId(0) newItem:SetText("Test Item") listCtrl:InsertItem(newItem) sizer:Add(listCtrl, 1, bit.bor(wx.wxALL,wx.wxEXPAND,wx.wxALIGN_CENTER_HORIZONTAL,wx.wxALIGN_CENTER_VERTICAL), 1) frame:SetSizer(sizer) sizer:SetSizeHints(frame) frame:Layout() -- show the frame window frame:Show(true) end main() -- Call wx.wxGetApp():MainLoop() last to start the wxWidgets event loop, -- otherwise the wxLua program will exit immediately. -- Does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit since the -- MainLoop is already running or will be started by the C++ program. wx.wxGetApp():MainLoop() On Tue, Feb 21, 2012 at 1:42 AM, John Labenski <jla...@gm...> wrote: > On Tue, Feb 21, 2012 at 3:44 AM, Milind Gupta <mil...@gm...> > wrote: > > After digging a bit deeper I find that the items are added to the control > > since subsequent calls to InsertItem does detect them but they are not > > visible in the GUI. I tried setting the text foreground color also to > black > > Do you call Freeze() on it before adding the items and forget to call > Thaw()? > > I see that you are skipping every other item since you call > GetNextItem() twice, but only check the value of it once and more > dangerously, don't check that you haven't fallen off the end of the > list after the second call. > > You could simply just add a few items where you know they'll be and > see if that works. > > Regards, > John > > > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > _______________________________________________ > wxlua-users mailing list > wxl...@li... > https://lists.sourceforge.net/lists/listinfo/wxlua-users > |
From: John L. <jla...@gm...> - 2012-02-21 09:43:06
|
On Tue, Feb 21, 2012 at 3:44 AM, Milind Gupta <mil...@gm...> wrote: > After digging a bit deeper I find that the items are added to the control > since subsequent calls to InsertItem does detect them but they are not > visible in the GUI. I tried setting the text foreground color also to black Do you call Freeze() on it before adding the items and forget to call Thaw()? I see that you are skipping every other item since you call GetNextItem() twice, but only check the value of it once and more dangerously, don't check that you haven't fallen off the end of the list after the second call. You could simply just add a few items where you know they'll be and see if that works. Regards, John |
From: Milind G. <mil...@gm...> - 2012-02-21 08:44:54
|
After digging a bit deeper I find that the items are added to the control since subsequent calls to InsertItem does detect them but they are not visible in the GUI. I tried setting the text foreground color also to black but still nothing. The List Control is created like: SelList = wx.wxListCtrl(parent, wx.wxID_ANY, wx.wxDefaultPosition, wx.wxDefaultSize,bit.bor(wx.wxLC_REPORT,wx.wxLC_NO_HEADER)) On Tue, Feb 21, 2012 at 12:30 AM, Milind Gupta <mil...@gm...>wrote: > Hi, > I wrote the following code to insert "item" which is a string into > a wxListCtrl which is ListBox. But at the end no item is added to the List > Control. It works fine on windows though. Basically it places the new item > so the list remains sorted and then places the item. At the first run > itemNum is taken as 0 but there is no element placed. Any ideas why it > doesn't work in Linux? > > Thanks > > InsertItem = function(ListBox,Item) > -- Check if the Item exists in the list control > local itemNum = -1 > while ListBox:GetNextItem(itemNum) ~= -1 do > local prevItemNum = itemNum > itemNum = ListBox:GetNextItem(itemNum) > local itemText = ListBox:GetItemText(itemNum) > if itemText == Item then > return true > end > if itemText > Item then > itemNum = prevItemNum > break > end > end > -- itemNum contains the item before which to place item > if itemNum == -1 then > itemNum = 0 > else > itemNum = itemNum + 1 > end > local newItem = wx.wxListItem() > newItem:SetId(itemNum) > newItem:SetText(Item) > ListBox:InsertItem(newItem) > return true > end > |
From: Milind G. <mil...@gm...> - 2012-02-21 08:30:12
|
Hi, I wrote the following code to insert "item" which is a string into a wxListCtrl which is ListBox. But at the end no item is added to the List Control. It works fine on windows though. Basically it places the new item so the list remains sorted and then places the item. At the first run itemNum is taken as 0 but there is no element placed. Any ideas why it doesn't work in Linux? Thanks InsertItem = function(ListBox,Item) -- Check if the Item exists in the list control local itemNum = -1 while ListBox:GetNextItem(itemNum) ~= -1 do local prevItemNum = itemNum itemNum = ListBox:GetNextItem(itemNum) local itemText = ListBox:GetItemText(itemNum) if itemText == Item then return true end if itemText > Item then itemNum = prevItemNum break end end -- itemNum contains the item before which to place item if itemNum == -1 then itemNum = 0 else itemNum = itemNum + 1 end local newItem = wx.wxListItem() newItem:SetId(itemNum) newItem:SetText(Item) ListBox:InsertItem(newItem) return true end |
From: John L. <jla...@gm...> - 2012-02-17 06:11:44
|
>> On Thu, Feb 16, 2012 at 12:06 PM, Mike Richards <mri...@gm...> >>> >>> function test() is declared in the current scope, and globally as >>> filterform.test >>> >>> After fiddling around for a bit, it looks like wx.wxEvtHandler:Connect >>> saves upvalues, but not the current function environment (scope), which was >>> set in the call to module(...) Mike you're right, I was wrong in my first reply. The environment is not saved and the global table is always set as the environment of the Lua event callback function. I haven't thought about this for awhile, but I can't think of any reason not to save it right now, however that code dates from over 5 years ago so I don't remember if it was tried it and it didn't work or what... Here's what's actually done before your Lua event handler function is called, where m_luafunc_ref is the reference to the Lua callback function that's put on the stack. http://wxlua.svn.sourceforge.net/viewvc/wxlua/trunk/wxLua/modules/wxlua/src/wxlcallb.cpp?revision=36&view=markup 191 if (wxlState.wxluaR_GetRef(m_luafunc_ref, &wxlua_lreg_refs_key)) 192 { 193 wxlState.lua_PushValue(LUA_GLOBALSINDEX); 194 if (wxlState.lua_SetFenv(-2) != 0) 195 { 196 // Don't track the wxEvent since we don't own it and tracking it 197 // causes clashes in the object registry table since many can be 198 // created and deleted and the mem address is resused by C++. 199 wxlState.wxluaT_PushUserDataType(event, event_wxl_type, false); 200 wxlState.LuaPCall(1, 0); // one input no returns >>> When the event function is called, the function environment is reset to >>> the global scope, so if you want to reference things you declared in the >>> module scope in the event callback, you have a couple of options: >>> 1. Declare everything as local, which to me is just good practice. >>> 2. Use a fully qualified name (e.g. filterform.test()) >>> 3. Wrap all your calls to wx.wxEvtHandler:Connect like this: >>> >>> function Connect(evthandler, id, func) >>> local environment = getfenv(1) >>> evthandler:Connect(id, >>> function(event) >>> setfenv(1, environment) >>> func(event) >>> end >>> ) >>> end >>> >>> [...] >>> >>> local button = wx.Button([...]) >>> Connect(button, wx.wxEVT_COMMAND_BUTTON_CLICKED, function(event) end) >>> >>> John -- It seems like wx.wxEvtHandler:Connect should do this anyways . . >>> . that is, save the current function environment, and then apply it before >>> calling the callback. I'll have to check a little bit more into 5.2 since get/setfenv are gone, but it looks like all you do is get/set the _ENV variable to get the same behavior. For the callback function, we'd set it as an upvalue to the callback function. http://www.corsix.org/content/look-lua-52-work3 If it's really that simple then yes, we can save the environment and not worry about breaking anything in 5.2, though under the hood it will be implemented differently. If I'm wrong and it can't be made to work in 5.2, then it should be left as is. I'm thinking a little out loud here... the pros of the global + upvalues (current state) is that you always get the same environment so there's no surprises, which is also a downside when you're in a module since you're not in what you thought was the global table. The downside of saving the environment of each Connect() callback is an extra reference to a Lua table. I'll look into it. Regards, John |
From: Milind G. <mil...@gm...> - 2012-02-16 22:18:04
|
Thanks, Milind On Thu, Feb 16, 2012 at 1:53 PM, Mike Richards <mri...@gm...> wrote: > Milind, > You could also accomplish the same with a little less typing if you want: > > module(...) > local _M = _M -- save the module table > > then in your event handler function it's just setfenv(1, _M) > > Mike > > On 2/16/2012 4:42 PM, Milind Gupta wrote: > > Hi Mike, > I agree a good practice is to declare things local, only for things > we want to access from outside unrestricted its easier not to declare them > local. So anyway what I ended up doing is having the first statement in my > event handler function as setfenv(1,package.loaded[modname]) where modname > is the name of the module passed by lua to the module. Since require loads > the module function there so it just picks it up from there. > > Thanks, > Milind > > On Thu, Feb 16, 2012 at 12:06 PM, Mike Richards <mri...@gm...>wrote: > >> John and Milind, >> >> function test() is declared in the current scope, and globally as >> filterform.test >> >> After fiddling around for a bit, it looks like wx.wxEvtHandler:Connect >> saves upvalues, but not the current function environment (scope), which was >> set in the call to module(...) >> When the event function is called, the function environment is reset to >> the global scope, so if you want to reference things you declared in the >> module scope in the event callback, you have a couple of options: >> 1. Declare everything as local, which to me is just good practice. >> 2. Use a fully qualified name (e.g. filterform.test()) >> 3. Wrap all your calls to wx.wxEvtHandler:Connect like this: >> >> function Connect(evthandler, id, func) >> local environment = getfenv(1) >> evthandler:Connect(id, >> function(event) >> setfenv(1, environment) >> func(event) >> end >> ) >> end >> >> [...] >> >> local button = wx.Button([...]) >> Connect(button, wx.wxEVT_COMMAND_BUTTON_CLICKED, function(event) end) >> >> John -- It seems like wx.wxEvtHandler:Connect should do this anyways . . >> . that is, save the current function environment, and then apply it before >> calling the callback. >> >> Mike >> >> >> On 2/16/2012 3:14 AM, Milind Gupta wrote: >> >> Hello John, >> Sorry for the carelessness. Here is a full set with >> minimal.lua which is the main file to run and the module function is called >> by the Help->About call back. That is true making test a local function >> makes it work although I am not totally clear why but if you press the >> other button 'Clear Task' it will give an error complaining about filter >> which again is not declared local. Actually declaring local anything in a >> module only makes it private. Whether it is declared local or not it always >> resides in the module environment. So even if test or filter are not >> declared local they should be identified in the module environment. Here is >> the Programming in Lua Modules and Packages chapter that clarifies it: >> >> http://www.inf.puc-rio.br/~roberto/pil2/chapter15.pdf >> >> At least that is how I understood it. So I think it should work without >> being declared local. In your previous email you said that the environment >> is saved as an upvalue with the execution of Connect. I am not sure how >> that would be done since the module itself does not know what environment >> to Global it will be in. Like if you see in minimal I placed it in the >> environment newPackage and all my functions tables declared in the module >> i.e. test, filter, etc. are in the table newPackage in the global >> environment but the module code has no way of knowing that. >> One last point is that unless its an event callback function normal >> functions in the module run just fine whether test is local or not. As an >> example I just added the test() call as the first line in >> filterFormActivate which is a non event function so when the Help-> About >> callback calls filterFormActivate, test() just runs fine even though it is >> not local but now if you press the Select Task button it will say it could >> not find test(). >> >> >> Milind >> >> >> On Wed, Feb 15, 2012 at 3:14 AM, Milind Gupta <milind.gupta@...><milind.gupta@...>wrote: >> > Hello John, >> > >> > thanks for the reply. Here is an example code that does not >> work >> >> Please try to provide enough code to make it run out of the box... I >> had to add back GUI.initFrameH and rem out the usage of MainSizer to >> make it even possible to run without error. >> >> > (Pasted below and attached the file as well). A function from the >> main wxlua >> > application calls filterFormActivate which sets up a simple frame with 2 >> > buttons and one static text and associates the button click to >> SelTaskPress. >> >> I made the help menu callback function of the minimal.wx.lua sample >> call filterform.filterFormActivate(frame). >> >> > But when the button is clicked the test() statement gives an error. >> If that >> > is removed then it cannot recognize the frame varaiable in the >> > wx.wxFrame(frame line after test(). >> >> Please always include these errors in the future to help diagnose the >> problem. >> >> In order to solve your problem I made test() a local function so that >> it will be an upvalue of the Connect() function that calls it. Note >> that the 'frame' that is used in the SelTaskPress() function is the >> frame from the minimal.wx.lua and not the frame from >> filterFormActivate(). >> >> To be honest, I have not done too much with modules and require in Lua >> since I'm not sure I fully understand its behavior. >> >> I just came across this which clears some things up for me. Note the >> sentence "This means that any global functions are not visible by >> default, which is why we had to create a local alias to print." This >> is probably also why making test() local above fixed it. See also >> package.seeall which might be useful to you. >> http://www.luafaq.org/#T1.37 >> >> Hope this helps, >> John >> >> >> >> ------------------------------------------------------------------------------ >> Virtualization & Cloud Management Using Capacity Planning >> Cloud computing makes use of virtualization - but cloud computing >> also focuses on allowing computing to be delivered as a service.http://www.accelacomm.com/jaw/sfnl/114/51521223/ >> >> >> >> _______________________________________________ >> wxlua-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/wxlua-users >> >> >> >> ------------------------------------------------------------------------------ >> Virtualization & Cloud Management Using Capacity Planning >> Cloud computing makes use of virtualization - but cloud computing >> also focuses on allowing computing to be delivered as a service. >> http://www.accelacomm.com/jaw/sfnl/114/51521223/ >> _______________________________________________ >> wxlua-users mailing list >> wxl...@li... >> https://lists.sourceforge.net/lists/listinfo/wxlua-users >> >> > > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service.http://www.accelacomm.com/jaw/sfnl/114/51521223/ > > > > _______________________________________________ > wxlua-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/wxlua-users > > > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > wxlua-users mailing list > wxl...@li... > https://lists.sourceforge.net/lists/listinfo/wxlua-users > > |
From: Mike R. <mri...@gm...> - 2012-02-16 21:53:57
|
Milind, You could also accomplish the same with a little less typing if you want: module(...) local _M = _M -- save the module table then in your event handler function it's just setfenv(1, _M) Mike On 2/16/2012 4:42 PM, Milind Gupta wrote: > Hi Mike, > I agree a good practice is to declare things local, only for > things we want to access from outside unrestricted its easier not to > declare them local. So anyway what I ended up doing is having the > first statement in my event handler function as > setfenv(1,package.loaded[modname]) where modname is the name of the > module passed by lua to the module. Since require loads the module > function there so it just picks it up from there. > > Thanks, > Milind > > On Thu, Feb 16, 2012 at 12:06 PM, Mike Richards <mri...@gm... > <mailto:mri...@gm...>> wrote: > > John and Milind, > > function test() is declared in the current scope, and globally as > filterform.test > > After fiddling around for a bit, it looks like > wx.wxEvtHandler:Connect saves upvalues, but not the current > function environment (scope), which was set in the call to module(...) > When the event function is called, the function environment is > reset to the global scope, so if you want to reference things you > declared in the module scope in the event callback, you have a > couple of options: > 1. Declare everything as local, which to me is just good practice. > 2. Use a fully qualified name (e.g. filterform.test()) > 3. Wrap all your calls to wx.wxEvtHandler:Connect like this: > > function Connect(evthandler, id, func) > local environment = getfenv(1) > evthandler:Connect(id, > function(event) > setfenv(1, environment) > func(event) > end > ) > end > > [...] > > local button = wx.Button([...]) > Connect(button, wx.wxEVT_COMMAND_BUTTON_CLICKED, function(event) end) > > John -- It seems like wx.wxEvtHandler:Connect should do this > anyways . . . that is, save the current function environment, and > then apply it before calling the callback. > > Mike > > > On 2/16/2012 3:14 AM, Milind Gupta wrote: >> Hello John, >> Sorry for the carelessness. Here is a full set with >> minimal.lua which is the main file to run and the module function >> is called by the Help->About call back. That is true making test >> a local function makes it work although I am not totally clear >> why but if you press the other button 'Clear Task' it will give >> an error complaining about filter which again is not declared >> local. Actually declaring local anything in a module only makes >> it private. Whether it is declared local or not it always resides >> in the module environment. So even if test or filter are not >> declared local they should be identified in the module >> environment. Here is the Programming in Lua Modules and Packages >> chapter that clarifies it: >> >> http://www.inf.puc-rio.br/~roberto/pil2/chapter15.pdf >> <http://www.inf.puc-rio.br/%7Eroberto/pil2/chapter15.pdf> >> >> At least that is how I understood it. So I think it should work >> without being declared local. In your previous email you said >> that the environment is saved as an upvalue with the execution of >> Connect. I am not sure how that would be done since the module >> itself does not know what environment to Global it will be in. >> Like if you see in minimal I placed it in the environment >> newPackage and all my functions tables declared in the module >> i.e. test, filter, etc. are in the table newPackage in the global >> environment but the module code has no way of knowing that. >> One last point is that unless its an event callback function >> normal functions in the module run just fine whether test is >> local or not. As an example I just added the test() call as the >> first line in filterFormActivate which is a non event function so >> when the Help-> About callback calls filterFormActivate, test() >> just runs fine even though it is not local but now if you press >> the Select Task button it will say it could not find test(). >> >> Milind >> >> >> On Wed, Feb 15, 2012 at 3:14 AM, Milind Gupta <milind.gupta@...> >> <mailto:milind.gupta@...> wrote: >> > Hello John, >> > >> > thanks for the reply. Here is an example code that >> does not work >> >> Please try to provide enough code to make it run out of the box... I >> had to add back GUI.initFrameH and rem out the usage of MainSizer to >> make it even possible to run without error. >> >> > (Pasted below and attached the file as well). A function from >> the main wxlua >> > application calls filterFormActivate which sets up a simple >> frame with 2 >> > buttons and one static text and associates the button click to >> SelTaskPress. >> >> I made the help menu callback function of the minimal.wx.lua sample >> call filterform.filterFormActivate(frame). >> >> > But when the button is clicked the test() statement gives an >> error. If that >> > is removed then it cannot recognize the frame varaiable in the >> > wx.wxFrame(frame line after test(). >> >> Please always include these errors in the future to help diagnose >> the problem. >> >> In order to solve your problem I made test() a local function so that >> it will be an upvalue of the Connect() function that calls it. Note >> that the 'frame' that is used in the SelTaskPress() function is the >> frame from the minimal.wx.lua and not the frame from >> filterFormActivate(). >> >> To be honest, I have not done too much with modules and require >> in Lua >> since I'm not sure I fully understand its behavior. >> >> I just came across this which clears some things up for me. Note the >> sentence "This means that any global functions are not visible by >> default, which is why we had to create a local alias to print." This >> is probably also why making test() local above fixed it. See also >> package.seeall which might be useful to you. >> http://www.luafaq.org/#T1.37 >> >> Hope this helps, >> John >> >> >> >> ------------------------------------------------------------------------------ >> Virtualization& Cloud Management Using Capacity Planning >> Cloud computing makes use of virtualization - but cloud computing >> also focuses on allowing computing to be delivered as a service. >> http://www.accelacomm.com/jaw/sfnl/114/51521223/ >> >> >> _______________________________________________ >> wxlua-users mailing list >> wxl...@li... <mailto:wxl...@li...> >> https://lists.sourceforge.net/lists/listinfo/wxlua-users > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > wxlua-users mailing list > wxl...@li... > <mailto:wxl...@li...> > https://lists.sourceforge.net/lists/listinfo/wxlua-users > > > > > ------------------------------------------------------------------------------ > Virtualization& Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > > > _______________________________________________ > wxlua-users mailing list > wxl...@li... > https://lists.sourceforge.net/lists/listinfo/wxlua-users |
From: Milind G. <mil...@gm...> - 2012-02-16 21:43:07
|
Hi Mike, I agree a good practice is to declare things local, only for things we want to access from outside unrestricted its easier not to declare them local. So anyway what I ended up doing is having the first statement in my event handler function as setfenv(1,package.loaded[modname]) where modname is the name of the module passed by lua to the module. Since require loads the module function there so it just picks it up from there. Thanks, Milind On Thu, Feb 16, 2012 at 12:06 PM, Mike Richards <mri...@gm...> wrote: > John and Milind, > > function test() is declared in the current scope, and globally as > filterform.test > > After fiddling around for a bit, it looks like wx.wxEvtHandler:Connect > saves upvalues, but not the current function environment (scope), which was > set in the call to module(...) > When the event function is called, the function environment is reset to > the global scope, so if you want to reference things you declared in the > module scope in the event callback, you have a couple of options: > 1. Declare everything as local, which to me is just good practice. > 2. Use a fully qualified name (e.g. filterform.test()) > 3. Wrap all your calls to wx.wxEvtHandler:Connect like this: > > function Connect(evthandler, id, func) > local environment = getfenv(1) > evthandler:Connect(id, > function(event) > setfenv(1, environment) > func(event) > end > ) > end > > [...] > > local button = wx.Button([...]) > Connect(button, wx.wxEVT_COMMAND_BUTTON_CLICKED, function(event) end) > > John -- It seems like wx.wxEvtHandler:Connect should do this anyways . . . > that is, save the current function environment, and then apply it before > calling the callback. > > Mike > > > On 2/16/2012 3:14 AM, Milind Gupta wrote: > > Hello John, > Sorry for the carelessness. Here is a full set with minimal.lua > which is the main file to run and the module function is called by the > Help->About call back. That is true making test a local function makes it > work although I am not totally clear why but if you press the other button > 'Clear Task' it will give an error complaining about filter which again is > not declared local. Actually declaring local anything in a module only > makes it private. Whether it is declared local or not it always resides in > the module environment. So even if test or filter are not declared local > they should be identified in the module environment. Here is the > Programming in Lua Modules and Packages chapter that clarifies it: > > http://www.inf.puc-rio.br/~roberto/pil2/chapter15.pdf > > At least that is how I understood it. So I think it should work without > being declared local. In your previous email you said that the environment > is saved as an upvalue with the execution of Connect. I am not sure how > that would be done since the module itself does not know what environment > to Global it will be in. Like if you see in minimal I placed it in the > environment newPackage and all my functions tables declared in the module > i.e. test, filter, etc. are in the table newPackage in the global > environment but the module code has no way of knowing that. > One last point is that unless its an event callback function normal > functions in the module run just fine whether test is local or not. As an > example I just added the test() call as the first line in > filterFormActivate which is a non event function so when the Help-> About > callback calls filterFormActivate, test() just runs fine even though it is > not local but now if you press the Select Task button it will say it could > not find test(). > > > Milind > > > On Wed, Feb 15, 2012 at 3:14 AM, Milind Gupta <milind.gupta@...><milind.gupta@...>wrote: > > Hello John, > > > > thanks for the reply. Here is an example code that does not > work > > Please try to provide enough code to make it run out of the box... I > had to add back GUI.initFrameH and rem out the usage of MainSizer to > make it even possible to run without error. > > > (Pasted below and attached the file as well). A function from the main > wxlua > > application calls filterFormActivate which sets up a simple frame with 2 > > buttons and one static text and associates the button click to > SelTaskPress. > > I made the help menu callback function of the minimal.wx.lua sample > call filterform.filterFormActivate(frame). > > > But when the button is clicked the test() statement gives an error. If > that > > is removed then it cannot recognize the frame varaiable in the > > wx.wxFrame(frame line after test(). > > Please always include these errors in the future to help diagnose the > problem. > > In order to solve your problem I made test() a local function so that > it will be an upvalue of the Connect() function that calls it. Note > that the 'frame' that is used in the SelTaskPress() function is the > frame from the minimal.wx.lua and not the frame from > filterFormActivate(). > > To be honest, I have not done too much with modules and require in Lua > since I'm not sure I fully understand its behavior. > > I just came across this which clears some things up for me. Note the > sentence "This means that any global functions are not visible by > default, which is why we had to create a local alias to print." This > is probably also why making test() local above fixed it. See also > package.seeall which might be useful to you. > http://www.luafaq.org/#T1.37 > > Hope this helps, > John > > > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service.http://www.accelacomm.com/jaw/sfnl/114/51521223/ > > > > _______________________________________________ > wxlua-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/wxlua-users > > > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > wxlua-users mailing list > wxl...@li... > https://lists.sourceforge.net/lists/listinfo/wxlua-users > > |
From: Mike R. <mri...@gm...> - 2012-02-16 20:06:47
|
John and Milind, function test() is declared in the current scope, and globally as filterform.test After fiddling around for a bit, it looks like wx.wxEvtHandler:Connect saves upvalues, but not the current function environment (scope), which was set in the call to module(...) When the event function is called, the function environment is reset to the global scope, so if you want to reference things you declared in the module scope in the event callback, you have a couple of options: 1. Declare everything as local, which to me is just good practice. 2. Use a fully qualified name (e.g. filterform.test()) 3. Wrap all your calls to wx.wxEvtHandler:Connect like this: function Connect(evthandler, id, func) local environment = getfenv(1) evthandler:Connect(id, function(event) setfenv(1, environment) func(event) end ) end [...] local button = wx.Button([...]) Connect(button, wx.wxEVT_COMMAND_BUTTON_CLICKED, function(event) end) John -- It seems like wx.wxEvtHandler:Connect should do this anyways . . . that is, save the current function environment, and then apply it before calling the callback. Mike On 2/16/2012 3:14 AM, Milind Gupta wrote: > Hello John, > Sorry for the carelessness. Here is a full set with > minimal.lua which is the main file to run and the module function is > called by the Help->About call back. That is true making test a local > function makes it work although I am not totally clear why but if you > press the other button 'Clear Task' it will give an error complaining > about filter which again is not declared local. Actually declaring > local anything in a module only makes it private. Whether it is > declared local or not it always resides in the module environment. So > even if test or filter are not declared local they should be > identified in the module environment. Here is the Programming in Lua > Modules and Packages chapter that clarifies it: > > http://www.inf.puc-rio.br/~roberto/pil2/chapter15.pdf > <http://www.inf.puc-rio.br/%7Eroberto/pil2/chapter15.pdf> > > At least that is how I understood it. So I think it should work > without being declared local. In your previous email you said that the > environment is saved as an upvalue with the execution of Connect. I am > not sure how that would be done since the module itself does not know > what environment to Global it will be in. Like if you see in minimal > I placed it in the environment newPackage and all my functions tables > declared in the module i.e. test, filter, etc. are in the table > newPackage in the global environment but the module code has no way of > knowing that. > One last point is that unless its an event callback function > normal functions in the module run just fine whether test is local or > not. As an example I just added the test() call as the first line in > filterFormActivate which is a non event function so when the Help-> > About callback calls filterFormActivate, test() just runs fine even > though it is not local but now if you press the Select Task button it > will say it could not find test(). > > Milind > > > On Wed, Feb 15, 2012 at 3:14 AM, Milind Gupta <milind.gupta@...> wrote: > > Hello John, > > > > thanks for the reply. Here is an example code that does > not work > > Please try to provide enough code to make it run out of the box... I > had to add back GUI.initFrameH and rem out the usage of MainSizer to > make it even possible to run without error. > > > (Pasted below and attached the file as well). A function from the > main wxlua > > application calls filterFormActivate which sets up a simple frame with 2 > > buttons and one static text and associates the button click to > SelTaskPress. > > I made the help menu callback function of the minimal.wx.lua sample > call filterform.filterFormActivate(frame). > > > But when the button is clicked the test() statement gives an error. > If that > > is removed then it cannot recognize the frame varaiable in the > > wx.wxFrame(frame line after test(). > > Please always include these errors in the future to help diagnose the > problem. > > In order to solve your problem I made test() a local function so that > it will be an upvalue of the Connect() function that calls it. Note > that the 'frame' that is used in the SelTaskPress() function is the > frame from the minimal.wx.lua and not the frame from > filterFormActivate(). > > To be honest, I have not done too much with modules and require in Lua > since I'm not sure I fully understand its behavior. > > I just came across this which clears some things up for me. Note the > sentence "This means that any global functions are not visible by > default, which is why we had to create a local alias to print." This > is probably also why making test() local above fixed it. See also > package.seeall which might be useful to you. > http://www.luafaq.org/#T1.37 > > Hope this helps, > John > > > > ------------------------------------------------------------------------------ > Virtualization& Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > > > _______________________________________________ > wxlua-users mailing list > wxl...@li... > https://lists.sourceforge.net/lists/listinfo/wxlua-users |
From: John L. <jla...@gm...> - 2012-02-16 02:38:16
|
On Wed, Feb 15, 2012 at 3:14 AM, Milind Gupta <mil...@gm...> wrote: > Hello John, > > thanks for the reply. Here is an example code that does not work Please try to provide enough code to make it run out of the box... I had to add back GUI.initFrameH and rem out the usage of MainSizer to make it even possible to run without error. > (Pasted below and attached the file as well). A function from the main wxlua > application calls filterFormActivate which sets up a simple frame with 2 > buttons and one static text and associates the button click to SelTaskPress. I made the help menu callback function of the minimal.wx.lua sample call filterform.filterFormActivate(frame). > But when the button is clicked the test() statement gives an error. If that > is removed then it cannot recognize the frame varaiable in the > wx.wxFrame(frame line after test(). Please always include these errors in the future to help diagnose the problem. In order to solve your problem I made test() a local function so that it will be an upvalue of the Connect() function that calls it. Note that the 'frame' that is used in the SelTaskPress() function is the frame from the minimal.wx.lua and not the frame from filterFormActivate(). To be honest, I have not done too much with modules and require in Lua since I'm not sure I fully understand its behavior. I just came across this which clears some things up for me. Note the sentence "This means that any global functions are not visible by default, which is why we had to create a local alias to print." This is probably also why making test() local above fixed it. See also package.seeall which might be useful to you. http://www.luafaq.org/#T1.37 Hope this helps, John |
From: John L. <jla...@gm...> - 2012-02-15 04:37:38
|
On Tue, Feb 14, 2012 at 10:09 PM, Milind Gupta <mil...@gm...> wrote: > Hi, > I wonder if this is a known issue or something intentional. I have > made a module that creates a frame with some buttons and associates an event > handling function for the button click, the function resides in the module > itself. The frame also is visible in the module. Now when the event handler > is called the event handler function is executed in the global environment > rather than the module environment hence it is not able to see the variables > and functions of the module. > Does this mean event handler functions cannot be in a module? It should be able to work and the environment is saved when the event:Connect() is handled. Upvalues work for sure. Do you have some simple example code of this for me to try. Regards, John |
From: Milind G. <mil...@gm...> - 2012-02-15 03:09:10
|
Hi, I wonder if this is a known issue or something intentional. I have made a module that creates a frame with some buttons and associates an event handling function for the button click, the function resides in the module itself. The frame also is visible in the module. Now when the event handler is called the event handler function is executed in the global environment rather than the module environment hence it is not able to see the variables and functions of the module. Does this mean event handler functions cannot be in a module? Thanks, Milind |
From: John L. <jla...@gm...> - 2012-02-03 18:31:26
|
On Mon, Jan 2, 2012 at 5:51 AM, fra III <ilt...@fa...> wrote: > Hello All, > when i run a lua script using wxLua, either mine that some of the > examples in distribution, closing application do not exit automatically > from the Lua interpreter, i.e. after closing main window i have to use > ctrl-C to stop all. This happens either in terminal that using Scite > editor. > Is this normal? No and I don't see that behaviour here in Fedora or MSW. If you simply run it as $ wxLua minimal.wx.lua then it should immediately exit when the minimal's wxFrame is closed. Does it still happen when you run that sample? > Also when i require wx the Lua function print is no working anymore > (seems there is another recent post about this). This was an unfortunate choice by me and the next version will not do that when run using require. A simple fix is to add this code that replaces the wxLua print function back with the Lua print function. print_wx = print -- save old print in case you want it... print = print_lua > I'm on Ubuntu 10.04 with wxwidget 2.8.12 from repository and > wxLua from recent (?) git. wxLua uses SVN now and has never used Git, so I don't know what version you've got. http://sourceforge.net/scm/?type=svn&group_id=140042 > Many thanks, > apologies if stupid question (i'm not a programmer!), > and Happy New Year (if it's matter for You). Sorry about the delay and no problem about asking. Regards, John |
From: John L. <jla...@gm...> - 2012-01-17 04:15:28
|
> (http://wewantarock.wordpress.com/2012/01/12/who-is-my-community/) is > asking "is anyone out there interested in a C binding to wxWidgets, and > if so, are they interested enough to want to help?" and although I > suggested author to post to some wx list where it could have bigger > impact, it would be nice if some of you can write something if you bear > some interest to help having stable and nicely maintained wxC project? I don't think we need wxC since it'll just be an extra step in binding for things to go wrong. The way things work with Lua is that it is no easier to bind to C than C++. Regards, John |
From: Gour <go...@at...> - 2012-01-15 08:31:39
|
Hello! Few days ago there was a post (http://wewantarock.wordpress.com/2012/01/11/wxhaskell-and-wxwidgets-2-9/) from one of the main developers of wxhaskell project informing about the future plans for the project preparing 2.9.x release. One of the interesting things mentioned is: - The C wrapper for wxWidgets has been moved into a separate project, wxC and built as a shared library which could be helpful, imho, for other wx-related projects and here I can think of e.g. wxLua & wxD. Another post (http://wewantarock.wordpress.com/2012/01/12/who-is-my-community/) is asking "is anyone out there interested in a C binding to wxWidgets, and if so, are they interested enough to want to help?" and although I suggested author to post to some wx list where it could have bigger impact, it would be nice if some of you can write something if you bear some interest to help having stable and nicely maintained wxC project? Sincerely, Gour -- One who is not connected with the Supreme can have neither transcendental intelligence nor a steady mind, without which there is no possibility of peace. And how can there be any happiness without peace? http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810 |
From: Milind G. <mil...@gm...> - 2012-01-05 23:36:26
|
Hi, Posting the message again to find out if it is possible to watch value of keys inside a table. When I tried that the watch just gives an error message saying: "string:Lua:Syntax error during pre-compilation" ? Just a question, does everybody just use the debug library to debug their code in Lua or is there a good graphical debugger that can help. I tried Lua Eclipse, it didn't work for me, cannot make Scite work to debug in Linux but even in windows its debugging is more command line rather than graphical. WxLua seemed to be the only solution that was working good but then I encountered this problem? Thanks, Milind On Wed, Dec 28, 2011 at 1:05 AM, Milind Gupta <mil...@gm...>wrote: > Hi, > I was able to install wxlua successfully and running the wxlua > IDE. One thing I notice that if I add a watch for a variable inside a table > it doesn't work. It just gives the error message "string:Lua:Syntax error > during pre-compilation". I tried giving the watch variable as a.hello as > well as a["hello"] but neither worked. Is this a limitation or am I doing > something wrong? > > Thanks, > Milind > |
From: fra I. <ilt...@fa...> - 2012-01-02 11:13:57
|
Hello All, when i run a lua script using wxLua, either mine that some of the examples in distribution, closing application do not exit automatically from the Lua interpreter, i.e. after closing main window i have to use ctrl-C to stop all. This happens either in terminal that using Scite editor. Is this normal? Am i wrong or missed something? Also when i require wx the Lua function print is no working anymore (seems there is another recent post about this). I'm on Ubuntu 10.04 with wxwidget 2.8.12 from repository and wxLua from recent (?) git. Many thanks, apologies if stupid question (i'm not a programmer!), and Happy New Year (if it's matter for You). Ciao, francesco. |
From: Andre A. <ar...@ki...> - 2012-01-01 19:15:24
|
print statements do not display to the console commenting the call to IsMainLoopRunning in wxlstate.cpp at line in wxlua_printFunction resolves the problem but may have some other implications. if (!msg.IsEmpty() && wxlState.Ok())// && wxApp::IsMainLoopRunning()) Andre |
From: SourceForge.net <no...@so...> - 2011-12-29 14:12:35
|
Feature Requests item #3466893, was opened at 2011-12-29 06:12 Message generated for change (Tracker Item Submitted) made by andrearpin You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=745327&aid=3466893&group_id=140042 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Interface Improvements (example) Group: None Status: Open Priority: 5 Private: No Submitted By: Andre Arpin (andrearpin) Assigned to: Nobody/Anonymous (nobody) Summary: Revise version of catch Initial Comment: This change is very odd but makes the joysticks work on window 7. Thank you for the changes and fixes you have done on this code. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=745327&aid=3466893&group_id=140042 |
From: John L. <jla...@gm...> - 2011-12-28 20:13:57
|
I thought it had worked and it should be made to work if it doesn't now. Until next week, you may want to try the wxlua.wxLuaStackDialog(...), please see usage in bingings.wx.lua if I remember correctly. It doesn't watch, but you can browse all the variables in Lua and a call to it halts the execution of the program so you can see what is going on at that point. Regards, John On Dec 28, 2011 4:05 AM, "Milind Gupta" <mil...@gm...> wrote: > Hi, > I was able to install wxlua successfully and running the wxlua > IDE. One thing I notice that if I add a watch for a variable inside a table > it doesn't work. It just gives the error message "string:Lua:Syntax error > during pre-compilation". I tried giving the watch variable as a.hello as > well as a["hello"] but neither worked. Is this a limitation or am I doing > something wrong? > > Thanks, > Milind > > > ------------------------------------------------------------------------------ > Write once. Port to many. > Get the SDK and tools to simplify cross-platform app development. Create > new or port existing apps to sell to consumers worldwide. Explore the > Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join > http://p.sf.net/sfu/intel-appdev > _______________________________________________ > wxlua-users mailing list > wxl...@li... > https://lists.sourceforge.net/lists/listinfo/wxlua-users > > |
From: Milind G. <mil...@gm...> - 2011-12-28 18:07:44
|
Hi John, Thanks for taking time to reply to those queries. Yes I rebuilt wxstedit and compiled wxlua again and now I have the wxlua application. For the wxGCDC thing I had to just go in the make file and change the linking paths from /usr/local/lib to /usr/lib and then it worked although not sure why. Then after everything was built I had to run ldconfig /usr/local/lib for successully running wxlua since it wasn't able to open libwxlua_gtk2u_wxbindstc-2.8.so.0. As you mentioned I see that the media control is missing in wxwidgets. I had built it with the instructions on the wiki of wxwidgets basically just running the plain make and make install. I will try again and see how I can enable everything. As of now I was just wondering if there is any way to watch table elements in the watch window of wxlua. Thanks, Milind Date: Tue, 27 Dec 2011 11:33:27 -0500 > From: John Labenski <jla...@gm...> > Subject: Re: [wxlua-users] cannot make wxlua on Ubuntu > To: wxl...@li... > Message-ID: > <CAAK6oFegMqzU4Frhpqk4KqDAKM0mTVcHTJjUPthaLOVc=L2...@ma... > > > Content-Type: text/plain; charset="iso-8859-1" > > It sounds like your wxWidgets build is incomplete for the media control. > Did you build it yourself? You'll need to rebuild it, but take note of the > warnings during the configure stage and install the devel libaries for > gstreamer until configure says that nothing is missing. You may need > libcairo for wxgcdc. > > The wxlua app should build is wxluafreeze built. Running $wxluafreeze > editor.wx.lua is the same as running wxlua. > > Again, I am w/o a computer or time for this week... > > John > On Dec 27, 2011 5:23 AM, "Milind Gupta" <mil...@gm...> wrote: > > > Ok, > > Was finally able to run wxlua applications. They seem to be > running > > but the media.wx.lua does not run. Gives the error: > > > > lua: media.wx.lua:131: attempt to call field 'wxMediaCtrl' (a nil value) > > stack traceback: > > media.wx.lua:131: in function 'main' > > media.wx.lua:305: in main chunk > > [C]: ? > > > > > > Don't know why that is the case. Also don't have the wxlua executable > > anywhere. I only see wxluacan and wxluafreeze. I did skip the wxstedit > > compilation, maybe that prevented wxlua creation? Trying wxstedit > > compilation now but it just won't compile. First there were include files > > it could not find now I get this error on running make: > > > > g++ -o ../samples/stedit/wxstedit wxstedit_wxstedit.o -L../lib -L../lib > > -lwxcode_gtk2u_stedit-2.8 -L/usr/local/lib -pthread > -lwx_gtk2u_stc-2.8 > > -lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu-2.8 > > /usr/lib/gcc/i686-linux-gnu/4.6.1/../../../../lib/libwx_gtk2u_stc-2.8.so > : > > undefined reference to `wxGCDC::wxGCDC(wxWindowDC const&)@WXU_2.8' > > /usr/lib/gcc/i686-linux-gnu/4.6.1/../../../../lib/libwx_gtk2u_stc-2.8.so > : > > undefined reference to `wxGCDC::SetPen(wxPen const&)@WXU_2.8' > > /usr/lib/gcc/i686-linux-gnu/4.6.1/../../../../lib/libwx_gtk2u_stc-2.8.so > : > > undefined reference to `wxGCDC::~wxGCDC()@WXU_2.8' > > /usr/lib/gcc/i686-linux-gnu/4.6.1/../../../../lib/libwx_gtk2u_stc-2.8.so > : > > undefined reference to `wxGCDC::SetBrush(wxBrush const&)@WXU_2.8' > > collect2: ld returned 1 exit status > > make: *** [../samples/stedit/wxstedit] Error 1 > > > > > > Any tips on how to get wxlua IDE? Thats the main thing I want to get. > > > > Thanks, > > Milind > > > > On Mon, Dec 26, 2011 at 11:01 AM, Milind Gupta <mil...@gm... > >wrote: > > > >> Hi John, > >> Thank you very much for your reply.t worked after that > >> and so did make install. But now when I try the example on the wxLua > >> website: > >> > >> require("wx") > >> frame = wx.wxFrame(wx.NULL, wx.wxID_ANY, "wxLua Minimal Demo", > >> wx.wxDefaultPosition, wx.wxSize(450, 450), > >> wx.wxDEFAULT_FRAME_STYLE) > >> > >> -- create a simple file menu > >> local fileMenu = wx.wxMenu() > >> fileMenu:Append(wx.wxID_EXIT, "E&xit", "Quit the program") > >> -- create a simple help menu > >> local helpMenu = wx.wxMenu() > >> helpMenu:Append(wx.wxID_ABOUT, "&About", > >> "About the wxLua Minimal Application") > >> > >> -- create a menu bar and append the file and help menus > >> local menuBar = wx.wxMenuBar() > >> menuBar:Append(fileMenu, "&File") > >> menuBar:Append(helpMenu, "&Help") > >> -- attach the menu bar into the frame > >> frame:SetMenuBar(menuBar) > >> > >> -- create a simple status bar > >> frame:CreateStatusBar(1) > >> frame:SetStatusText("Welcome to wxLua.") > >> > >> -- connect the selection event of the exit menu item to an > >> -- event handler that closes the window > >> frame:Connect(wx.wxID_EXIT, wx.wxEVT_COMMAND_MENU_SELECTED, > >> function (event) frame:Close(true) end ) > >> -- connect the selection event of the about menu item > >> frame:Connect(wx.wxID_ABOUT, wx.wxEVT_COMMAND_MENU_SELECTED, > >> function (event) > >> wx.wxMessageBox('This is the "About" dialog of the Minimal > >> wxLua sample.', > >> "About wxLua", > >> wx.wxOK + wx.wxICON_INFORMATION, > >> frame) > >> end ) > >> > >> -- finally, show the frame window > >> frame:Show(true) > >> > >> > >> > >> > >> I get these messages and nothing happens: > >> > >> (lua5.1:11526): Gtk-WARNING **: Unable to locate theme engine in > >> module_path: "pixmap", > >> > >> (lua5.1:11526): Gtk-WARNING **: Unable to locate theme engine in > >> module_path: "pixmap", > >> > >> (lua5.1:11526): Gtk-WARNING **: Unable to locate theme engine in > >> module_path: "pixmap", > >> > >> (lua5.1:11526): Gtk-WARNING **: Unable to locate theme engine in > >> module_path: "pixmap", > >> > >> > >> I am not sure what is wrong. Any help would be really appreciated. > >> Another thing is that when I type wxlua on the prompt it says command > not > >> found. How do I run the integrated IDE provided by wxlua? > >> > >> Thanks, > >> Milind > >> > >> > >> Date: Mon, 26 Dec 2011 08:53:56 -0500 > >> From: John Labenski <jla...@gm...> > >> Subject: Re: [wxlua-users] cannot make wxlua on Ubuntu > >> To: wxl...@li... > >> Message-ID: > >> < > >> CAA...@ma...> > >> Content-Type: text/plain; charset="windows-1252" > >> > >> As a temporary measure, if you don't plan on using a wxImageHistogram, > you > >> can rem out the contents of that funtion and have it return 0. I'll look > >> into it in the new year. > >> > >> Regards, > >> John > >> > >> On Dec 26, 2011 3:34 AM, "Milind Gupta" <mil...@gm...> wrote: > >> > >> > Hi, > >> > When I make wxLua by following the installtion > >> instructions I > >> > get the following error: > >> > > >> > make > >> > (cd ./modules/ && make ) > >> > make[1]: Entering directory `/home/aryajur/Downloads/wxLua/modules' > >> > /home/aryajur/Downloads/wxLua/bk-deps g++ -c -o > >> > wxbindcore_dll_wxcore_image.o -I.pch/wxprec_wxbindcore_dll > >> > -I../modules/wxbind/setup -I../modules -I./.. -I/usr/include/lua5.1 > >> > -DWXMAKINGDLL_WXBINDCORE -fPIC -DPIC > >> > -I/usr/local/lib/wx/include/gtk2-unicode-release-2.8 > >> > -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES > >> > -D__WXGTK__ -pthread -DwxLUA_USEBINDING_WXGL=0 > >> -DwxLUA_USEBINDING_WXMEDIA=0 > >> > -DwxLUA_USEBINDING_WXSTC=0 -O2 ./wxbind/src/wxcore_image.cpp > >> > ./wxbind/src/wxcore_image.cpp: In function ?int > >> > wxLua_wxImageHistogram_iterator_op_inc(lua_State*)?: > >> > >> > ./wxbind/src/wxcore_image.cpp:2296:54: error: taking address of > >> temporary > >> > [-fpermissive] > >> > make[1]: *** [wxbindcore_dll_wxcore_image.o] Error 1 > >> > make[1]: Leaving directory `/home/aryajur/Downloads/wxLua/modules' > >> > make: *** [modules] Error 2 > >> > aryajur@aryajur-ThinkPad-X61-Tablet:~/Downloads/wxLua$ make > >> -fpermissive > >> > make: permissive: No such file or directory > >> > make: *** No rule to make target `permissive'. Stop. > >> > > >> > > >> > Please can anybody help me resolve this. Or is there an easier way to > >> > install wxLua??? > >> > > >> > Thanks, > >> > Milind > >> > > >> > > >> > ------------------------------------------------------------ > >> ------------------ > >> > Write once. Port to many. > >> > Get the SDK and tools to simplify cross-platform app development. > Create > >> > new or port existing apps to sell to consumers worldwide. Explore the > >> > Intel AppUpSM program developer opportunity. > >> appdeveloper.intel.com/join > >> > http://p.sf.net/sfu/intel-appdev > >> > _______________________________________________ > >> > wxlua-users mailing list > >> > wxl...@li... > >> > https://lists.sourceforge.net/lists/listinfo/wxlua-users > >> > > >> > > > > > > > > > > > > ------------------------------------------------------------------------------ > > Write once. Port to many. > > Get the SDK and tools to simplify cross-platform app development. Create > > new or port existing apps to sell to consumers worldwide. Explore the > > Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join > > http://p.sf.net/sfu/intel-appdev > > _______________________________________________ > > wxlua-users mailing list > > wxl...@li... > > https://lists.sourceforge.net/lists/listinfo/wxlua-users > > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > > ------------------------------ > > Message: 2 > Date: Wed, 28 Dec 2011 01:05:19 -0800 > From: Milind Gupta <mil...@gm...> > Subject: [wxlua-users] wxlua application > To: wxl...@li... > Message-ID: > <CAO...@ma... > > > Content-Type: text/plain; charset="iso-8859-1" > > Hi, > I was able to install wxlua successfully and running the wxlua > IDE. One thing I notice that if I add a watch for a variable inside a table > it doesn't work. It just gives the error message "string:Lua:Syntax error > during pre-compilation". I tried giving the watch variable as a.hello as > well as a["hello"] but neither worked. Is this a limitation or am I doing > something wrong? > > Thanks, > Milind > -------------- next part -------------- > An HTML attachment was scrubbed... > > ------------------------------ > > Message: 3 > Date: Wed, 28 Dec 2011 08:09:55 -0800 > From: SourceForge.net <no...@so...> > Subject: [wxlua-users] [ wxlua-Feature Requests-3466523 ] Client > Server > To: SourceForge.net <no...@so...> > Message-ID: > <mai...@li...> > Content-Type: text/plain; charset=UTF-8 > > Feature Requests item #3466523, was opened at 2011-12-28 08:09 > Message generated for change (Tracker Item Submitted) made by andrearpin > You can respond by visiting: > > https://sourceforge.net/tracker/?func=detail&atid=745327&aid=3466523&group_id=140042 > > Please note that this message will contain a full copy of the comment > thread, > including the initial issue submission, for this request, > not just the latest update. > Category: Interface Improvements (example) > Group: None > Status: Open > Priority: 5 > Private: No > Submitted By: Andre Arpin (andrearpin) > Assigned to: Nobody/Anonymous (nobody) > Summary: Client Server > > Initial Comment: > New version > > ---------------------------------------------------------------------- > > You can respond by visiting: > > https://sourceforge.net/tracker/?func=detail&atid=745327&aid=3466523&group_id=140042 > > > > ------------------------------ > > > ------------------------------------------------------------------------------ > Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex > infrastructure or vast IT resources to deliver seamless, secure access to > virtual desktops. With this all-in-one solution, easily deploy virtual > desktops for less than the cost of PCs and save 60% on VDI infrastructure > costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox > > ------------------------------ > > _______________________________________________ > wxlua-users mailing list > wxl...@li... > https://lists.sourceforge.net/lists/listinfo/wxlua-users > > > End of wxlua-users Digest, Vol 53, Issue 8 > ****************************************** > |
From: SourceForge.net <no...@so...> - 2011-12-28 16:09:56
|
Feature Requests item #3466523, was opened at 2011-12-28 08:09 Message generated for change (Tracker Item Submitted) made by andrearpin You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=745327&aid=3466523&group_id=140042 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Interface Improvements (example) Group: None Status: Open Priority: 5 Private: No Submitted By: Andre Arpin (andrearpin) Assigned to: Nobody/Anonymous (nobody) Summary: Client Server Initial Comment: New version ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=745327&aid=3466523&group_id=140042 |
From: Milind G. <mil...@gm...> - 2011-12-28 09:05:26
|
Hi, I was able to install wxlua successfully and running the wxlua IDE. One thing I notice that if I add a watch for a variable inside a table it doesn't work. It just gives the error message "string:Lua:Syntax error during pre-compilation". I tried giving the watch variable as a.hello as well as a["hello"] but neither worked. Is this a limitation or am I doing something wrong? Thanks, Milind |