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: Steve K. <ha...@ya...> - 2006-07-08 21:55:35
|
Hi everyone, I found a problem in win32 wrt unicode things. My test program is simple a multiline text widgets ; cut and paste a unicode text into the widgets and display the value using GetValue() by wx.wxMesasgeBox. In Linux it is working as expected. But in win2k, winXP , win98, it does not display anything pssibly the value is nil. If the text is not unicoded then it displayed correctly. Wxwidgets in win32 compiled with unicode support and mslu support. Normal wx apps is fine. wxLua is the snapshot wxLua_Snapshot_2006-06-21.tar.gz Is it a known problem and has been fixed in the current snapshot ? How to debug (if it is a bug then ) The following is the code smaple f=wx.wxFrame(wx.wxNull, -1, "") s0=wx.wxBoxSizer(wx.wxVERTICAL) f:SetSizer(s0) text=wx.wxTextCtrl(f, 10004, "", wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxTE_MULTILINE) b0=wx.wxButton(f, 10000, "Display") s0:AddWindow(text) s0:AddWindow(b0) f:Connect(-1, wx.wxEVT_COMMAND_BUTTON_CLICKED, function (e) wx.wxMessageBox(text:GetValue()) end) f:Show(true) Cheers, S.KIEU Send instant messages to your online friends http://au.messenger.yahoo.com |
From: Josh T. <zen...@ya...> - 2006-06-29 16:48:36
|
"I don't think you can use the dll with a project like wxLua that has already linked with the exact same .lib, but I could be wrong. Perhaps since the luasocket is trying to open the lua dll it will resolve the names of the functions it needs soley from within the dll, if so it should work?" This most definately will not work. Any static/global variables in one library will not resolve to the other. You can successfully link and run together, but you will have problems such as random crashes if the lua libraries rely on static/global variables stored in the library. To link correctly you'll need to link luasocket.dll and wxLua.dll against the same lua50.dll. I have the same problem with wxLua , but apparently the CVS version fixes that. Hurray for lua 5.1 standardization of binary modules :) John Labenski <jla...@gm...> wrote: On 6/21/06, Steve Kieu wrote: > > I have several lua addon and want to use with wxLua. (luasocket for > example). Compile in window with vc7, I have to supply the .lib lua (I use > lua50.lib which is a pair with lua50.dll download from lua binaries). As far > as I understand the compiler need the .lib to resolve symbols in the addon > lib. When I call from wxLua script (running by one of wxLuaState) it would > not depend on lua50.dll . But it is not right, it still requires lua50.dll > which might be incompatible with wxLua. My question is why and is there any > problem with it apart from I have to bring lua50.dll while I have already > lua interpreter in my app. I don't know? Does the linker tell you about unresolved symbols and their names? Can you just link directly to luasocket if you compile it as a lib as well? > Adding the lua addon files to my project and directly link to my app is one > solution but luasocket is rather complex pack. > > What I would like to do is to compile third party addon lib but not depend > on lua50.dll when I have wxLua ; how can I do this? I don't think you can use the dll with a project like wxLua that has already linked with the exact same .lib, but I could be wrong. Perhaps since the luasocket is trying to open the lua dll it will resolve the names of the functions it needs soley from within the dll, if so it should work? In any case trying to mix and match lua versions will never work. The 2.6.2 wxLua uses a fairly vanilla 5.0.2, the changes made for wxLua should not affect the normal operation of the lua_State. IIRC you wanted to stay with 5.0, but if you use wxLua from CVS or a snapshot you can use wxLua as a dll as well, but it's lua 5.1. Good luck, John Labenski Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Wxlua-users mailing list Wxl...@li... https://lists.sourceforge.net/lists/listinfo/wxlua-users --------------------------------- Yahoo! Music Unlimited - Access over 1 million songs.Try it free. |
From: John L. <jla...@gm...> - 2006-06-23 14:15:00
|
On 6/23/06, Steve Kieu <ha...@ya...> wrote: > > not depend on lua50.dll . But it is not right, it still requires lua50.dll > > which might be incompatible with wxLua. My question is why and is there > any > > problem with it apart from I have to bring lua50.dll while I have already > > lua interpreter in my app. > > I don't know? Does the linker tell you about unresolved symbols and > their names? Can you just link directly to luasocket if you compile it > To compile the tird party lib, yes vc7 complains unresolve symbol if I do > not suppliy the lua50.lib in the input field. > > I think all strange things of my apps in win32 is from that reason. > Inconsistency in lua state because of the binary third party lib. Just like > round problem, you need lua50.lib to compile the lib and at runtime it > requiers lua50.dll and your own has another lua state. Good to know. > I just remove all third party libs, integrate it into the project as a cpp > source file and use lua C API ..., remove luasql etc.. > > And everything works stable as expected. I do not need to link stc lib any > more in win98 to avoice memory allocation error ; win2k is stable again . Ok... maybe this "problem" will make itself known somehow. > BY the way, I noticed the latest version of wxLua, the lua_PushLString() > signature changes (from wxString ); what reason? I found using wxString is > easier as we are doing in in wxWidget then... Oh, I thought that since lua_PushString can take either a const char* or wxString that would be suitable. If you want to use lua_PushLString for a wxString, eg. you want to only use part of the string, just use lua_PushString( wxstr.Mid(0, len) ); since it's safer than doing the below since Mid will check the lengths for us. wxString a(wxT("Hello")); lua_pushlstring(wx2lua(a), 20); <-- whoops! Regards, John Labenski > Cheers, > > > > as a lib as well? > > > Adding the lua addon files to my project and directly link to my app is > one > > solution but luasocket is rather complex pack. > > > > What I would like to do is to compile third party addon lib but not depend > > on lua50.dll when I have wxLua ; how can I do this? > > I don't think you can use the dll with a project like wxLua that has > already linked with the exact same .lib, but I could be wrong. Perhaps > since the luasocket is trying to open the lua dll it will resolve the > names of the functions it needs soley from within the dll, if so it > should work? In any case trying to mix and match lua versions will > never work. The 2.6.2 wxLua uses a fairly vanilla 5.0.2, the changes > made for wxLua should not affect the normal operation of the > lua_State. > > IIRC you wanted to stay with 5.0, but if you use wxLua from CVS or a > snapshot you can use wxLua as a dll as well, but it's lua 5.1. > > Good luck, > John Labenski > > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Wxlua-users mailing list > Wxl...@li... > https://lists.sourceforge.net/lists/listinfo/wxlua-users > > > > S.KIEU > > ________________________________ > Do you Yahoo!? > Yahoo! Music: Check out the gig guide for live music in your area > > > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > _______________________________________________ > Wxlua-users mailing list > Wxl...@li... > https://lists.sourceforge.net/lists/listinfo/wxlua-users > > > |
From: Steve K. <ha...@ya...> - 2006-06-23 09:04:06
|
John Labenski <jla...@gm...> wrote: > not depend on lua50.dll . But it is not right, it still requires lua50.dll > which might be incompatible with wxLua. My question is why and is there any > problem with it apart from I have to bring lua50.dll while I have already > lua interpreter in my app. I don't know? Does the linker tell you about unresolved symbols and their names? Can you just link directly to luasocket if you compile it To compile the tird party lib, yes vc7 complains unresolve symbol if I do not suppliy the lua50.lib in the input field. I think all strange things of my apps in win32 is from that reason. Inconsistency in lua state because of the binary third party lib. Just like round problem, you need lua50.lib to compile the lib and at runtime it requiers lua50.dll and your own has another lua state. I just remove all third party libs, integrate it into the project as a cpp source file and use lua C API ..., remove luasql etc.. And everything works stable as expected. I do not need to link stc lib any more in win98 to avoice memory allocation error ; win2k is stable again . The draw back is that some big libs, it is not easy to integrate by source into the system. And some, licence issue as well... But it is just my imagination, at the moment I have no problem with it BY the way, I noticed the latest version of wxLua, the lua_PushLString() signature changes (from wxString ); what reason? I found using wxString is easier as we are doing in in wxWidget then... Cheers, as a lib as well? > Adding the lua addon files to my project and directly link to my app is one > solution but luasocket is rather complex pack. > > What I would like to do is to compile third party addon lib but not depend > on lua50.dll when I have wxLua ; how can I do this? I don't think you can use the dll with a project like wxLua that has already linked with the exact same .lib, but I could be wrong. Perhaps since the luasocket is trying to open the lua dll it will resolve the names of the functions it needs soley from within the dll, if so it should work? In any case trying to mix and match lua versions will never work. The 2.6.2 wxLua uses a fairly vanilla 5.0.2, the changes made for wxLua should not affect the normal operation of the lua_State. IIRC you wanted to stay with 5.0, but if you use wxLua from CVS or a snapshot you can use wxLua as a dll as well, but it's lua 5.1. Good luck, John Labenski Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Wxlua-users mailing list Wxl...@li... https://lists.sourceforge.net/lists/listinfo/wxlua-users S.KIEU --------------------------------- Do you Yahoo!? Yahoo! Music: Check out the gig guide for live music in your area |
From: John L. <jla...@gm...> - 2006-06-23 03:04:57
|
On 6/21/06, Steve Kieu <ha...@ya...> wrote: > You may get my work from: http://www.dynaset.org/dogusanh > Thanks ; will try later. At the moment I use SendError() in wxLuaState to > send lua error event and capture it in an event handler which seems to work > fine as well. However wxSQLite3 (or maybe sqlite3) is so pedantic about > errors, many sql errors it does not throw exception at all but crash. with > the message Aborted . Some errors are reported though but kind of table not > exists or field name not exist, it just crash the whole app. Not quite sure > if your binding shows this symptom? I got it even use wxSQLite3 alone in c++ > code as well. As a side note, I've removed wxLuaState::SendError in the latest version since I didn't think anyone used it and IIRC it was only used by one, maybe two functions in wxLua so I thought it was a little overkill. Use the code below in the future. wxLuaEvent event(wxEVT_LUA_ERROR, wxlState.GetId(), wxlState); event.SetString(errorMsg); event.SetInt((int)line); wxlState.SendEvent(event); Regards, John Labenski |
From: John L. <jla...@gm...> - 2006-06-23 02:42:38
|
On 6/21/06, Steve Kieu <ha...@ya...> wrote: > > I have several lua addon and want to use with wxLua. (luasocket for > example). Compile in window with vc7, I have to supply the .lib lua (I use > lua50.lib which is a pair with lua50.dll download from lua binaries). As far > as I understand the compiler need the .lib to resolve symbols in the addon > lib. When I call from wxLua script (running by one of wxLuaState) it would > not depend on lua50.dll . But it is not right, it still requires lua50.dll > which might be incompatible with wxLua. My question is why and is there any > problem with it apart from I have to bring lua50.dll while I have already > lua interpreter in my app. I don't know? Does the linker tell you about unresolved symbols and their names? Can you just link directly to luasocket if you compile it as a lib as well? > Adding the lua addon files to my project and directly link to my app is one > solution but luasocket is rather complex pack. > > What I would like to do is to compile third party addon lib but not depend > on lua50.dll when I have wxLua ; how can I do this? I don't think you can use the dll with a project like wxLua that has already linked with the exact same .lib, but I could be wrong. Perhaps since the luasocket is trying to open the lua dll it will resolve the names of the functions it needs soley from within the dll, if so it should work? In any case trying to mix and match lua versions will never work. The 2.6.2 wxLua uses a fairly vanilla 5.0.2, the changes made for wxLua should not affect the normal operation of the lua_State. IIRC you wanted to stay with 5.0, but if you use wxLua from CVS or a snapshot you can use wxLua as a dll as well, but it's lua 5.1. Good luck, John Labenski |
From: Steve K. <ha...@ya...> - 2006-06-22 01:52:28
|
Hi, Hakki Dogusan <dog...@tr...> wrote: Hi, Steve Kieu yazmıÅ: In my lua binding of wxSQLite3 (done with Lunar), I returned exception object as an additional result of functions. //--------------------------------------------------------------------------- // push_exception // // NOTE: nil is pushed for SQLITE_OK // // Exception object is returned as last(additional) function result // Usage ex: // local rid,e = db:GetLastRowId() // if e then -- an exception throwed (rid set to nil also) // -- use exception object // ec = e:GetErrorCode() // es = e:GetMessage() // end //--------------------------------------------------------------------------- You may get my work from: http://www.dynaset.org/dogusanh Thanks ; will try later. At the moment I use SendError() in wxLuaState to send lua error event and capture it in an event handler which seems to work fine as well. However wxSQLite3 (or maybe sqlite3) is so pedantic about errors, many sql errors it does not throw exception at all but crash. with the message Aborted . Some errors are reported though but kind of table not exists or field name not exist, it just crash the whole app. Not quite sure if your binding shows this symptom? I got it even use wxSQLite3 alone in c++ code as well. Cheers, S.KIEU --------------------------------- On Yahoo!7 360°: Your own space to share what you want with who you want! |
From: Steve K. <ha...@ya...> - 2006-06-21 23:32:00
|
Hi all, I have several lua addon and want to use with wxLua. (luasocket for example). Compile in window with vc7, I have to supply the .lib lua (I use lua50.lib which is a pair with lua50.dll download from lua binaries). As far as I understand the compiler need the .lib to resolve symbols in the addon lib. When I call from wxLua script (running by one of wxLuaState) it would not depend on lua50.dll . But it is not right, it still requires lua50.dll which might be incompatible with wxLua. My question is why and is there any problem with it apart from I have to bring lua50.dll while I have already lua interpreter in my app. Adding the lua addon files to my project and directly link to my app is one solution but luasocket is rather complex pack. What I would like to do is to compile third party addon lib but not depend on lua50.dll when I have wxLua ; how can I do this? Thanks in advance. Cheers, S.KIEU --------------------------------- Do you Yahoo!? Yahoo! Music: Check out the gig guide for live music in your area |
From: Steve K. <ha...@ya...> - 2006-06-21 05:12:32
|
Hi, Contributions are welcome. :) I would like to but frankly I do not like wxODBC much ; the way (API) it works is not intuitive to me at least. (sometimes I feel it is unnatural and not straight foward. Of course by the end of the day the my app db layer will wrap all this into a consistent API ) I may use another tool or write much simpler approach in c++ and bind it. Cheers, S.KIEU --------------------------------- Do you Yahoo!? Yahoo! Music: Check out the gig guide for live music in your area |
From: John L. <jla...@gm...> - 2006-06-21 04:09:29
|
On 6/20/06, Steve Kieu <ha...@ya...> wrote: > >> Well, this points to luasql as being the culprit. What if you just add >> the luasql files directly to your project instead of compiling it as a >> separate lib? > > Actually the reason is a bit complex. First I can crash it without any db > operation at all just open dialog and close it many times ; it crashed in > win2k and win98 with 16Mb of ram. Then I added Destroy() method and call it. > Now win98 is fine but still not win2k. I've checked in a "fix" for wxLua's GC routine that hopefully will work a little better for some things. It won't solve the dialog problem since it seems that you need about 4000 items for the GC to run using it's default settings, but if you run this in lua at the top of your program it drops the number of items to 9, of course you get a penalty of running the GC more often. The lua docs for collectgarbage are not really clear to me so I just played around with the values. collectgarbage("setpause", 10) In any case just remember to always Destroy windows, colours, pens, brushes, bitmaps, basicly any GDI object since MSWindows can only have a limited number of them. > Compile luasql in win32 is really pain to me and I am a bit impatient for > this kind of job. I do not that add luasql files to existing project is > easier and no promise that the stability improves. On the other hand, bind > wxSqlite to wxLua is quite easy and it works stable now. For another db > type I can use wxODBC but unfortunately wxODBC not bind to wxLua yet :-) Contributions are welcome. :) > I am quite happy to find that the problem is not actually wxLua or wxWidget > but a third party packages, so I do not have to re-design and switch to > another technology. wxLua rocks! I'm glad you managed to get it to work, at least in some way. Regards, John Labenski |
From: Steve K. <ha...@ya...> - 2006-06-21 02:21:29
|
Well, this points to luasql as being the culprit. What if you just add the luasql files directly to your project instead of compiling it as a separate lib? Actually the reason is a bit complex. First I can crash it without any db operation at all just open dialog and close it many times ; it crashed in win2k and win98 with 16Mb of ram. Then I added Destroy() method and call it. Now win98 is fine but still not win2k. Compile luasql in win32 is really pain to me and I am a bit impatient for this kind of job. I do not that add luasql files to existing project is easier and no promise that the stability improves. On the other hand, bind wxSqlite to wxLua is quite easy and it works stable now. For another db type I can use wxODBC but unfortunately wxODBC not bind to wxLua yet :-) I am quite happy to find that the problem is not actually wxLua or wxWidget but a third party packages, so I do not have to re-design and switch to another technology. wxLua rocks! Cheers Regards, John Labenski _______________________________________________ Wxlua-users mailing list Wxl...@li... https://lists.sourceforge.net/lists/listinfo/wxlua-users S.KIEU --------------------------------- Do you Yahoo!? Yahoo! Music: Check out the gig guide for live music in your area |
From: John L. <jla...@gm...> - 2006-06-20 15:51:08
|
On 6/20/06, Steve Kieu <ha...@ya...> wrote: > > I believe it is a problem with the garbage collector of 5.1. I cannot > seem to find a way to force it to do a GC on "dead" locals. For > example > I think it is the problem with wxWidget. The similar test but in purely > wxWidgets show the same symptoms, and the symtom goes away if I do : > > Call Destroy() explicitely Or manually delete the pointer (no good) > This helps to solve the bug with memory for me. > > According to wxWidgets docs, it seems no need to call Destroy() after the > modal dialog has closed but it seems not right. Suppose for some other > widgets as well. Thankfully it doesn't destroy the dialog after ShowModal() since for many dialogs thats when you get the values that the user had entered, eg. the file dialog. > I have added to my copy of wxlua 2.6.2 method Destroy for wx.wxDialog, and > noticed that it has not been added to the snapshot 2006-06-15, so I thought > we should add Destroy() to the bindings as well as wxPanel, wxFrame (top > windows level object) They all already have it through the wxWindow base class. > with lua50 in 2.6.2 I have test the gc and it seems to work fine. Have a > win98 run in vmware with only 16Mb ram and unable to crash it. Have not > tested with lua5.1 though. That's interesting, but since the GC in lua completely changed from 50 to 51, probably not too helpful. I guess we'll have to find a way to force 51 to be a little more aggressive. > Stiil my apps unstable esp in win2k and a strange combination; use wxLua and > luasql from kepler project; and even with luasqlite3. It runs for a while > and crash if I do db operations. just a simple write and show the form > several times enough to crash it (in win2k pro). I have done many test > narrowing down the cause without much success. Just several mins ago I bind > wxsqlite3 to wxLua and use it instead of luasql and things seems to be fine. > Will test it more to confirm. Now I will have to rewrite the whole database > layer using wxsqlite3 instead. To be independent of luasql I can use the > latest wxlua which is also a good thing . Well, this points to luasql as being the culprit. What if you just add the luasql files directly to your project instead of compiling it as a separate lib? Regards, John Labenski |
From: John L. <jla...@gm...> - 2006-06-20 15:41:59
|
On 6/20/06, Steve Kieu <ha...@ya...> wrote: > > Hi all, I am trying to bind wxSqlite3 to lua and do not know how to use > exception in wxlua. wxSqlite3 has an exception class and in c++ the try > catch exception. How can I use it in wxlua? Something translated like > > local db=wxSqlite3DB() > db:Open(path) > x,y=db:ExecuteQuery(sql) > > -- if x =nil then y contains error msg. > > Can I I do it in wxlua binding r I have to manually code it in c++ using lua > c api? The wxLua binding generator cannot return multiple values. These have to be coded by hand in your override file. Secondly, wxLua also doesn't deal with exceptions and neither does wxWidgets. Regards, John Labenski |
From: Hakki D. <dog...@tr...> - 2006-06-20 12:07:22
|
Hi, Steve Kieu yazmış: > > Hi all, I am trying to bind wxSqlite3 to lua and do not know how to use > exception in wxlua. wxSqlite3 has an exception class and in c++ the try > catch exception. How can I use it in wxlua? Something translated like > > local db=wxSqlite3DB() > db:Open(path) > x,y=db:ExecuteQuery(sql) > > -- if x =nil then y contains error msg. > > Can I I do it in wxlua binding r I have to manually code it in c++ using > lua c api? > > cheers > > > > S.KIEU > In my lua binding of wxSQLite3 (done with Lunar), I returned exception object as an additional result of functions. //--------------------------------------------------------------------------- // push_exception // // NOTE: nil is pushed for SQLITE_OK // // Exception object is returned as last(additional) function result // Usage ex: // local rid,e = db:GetLastRowId() // if e then -- an exception throwed (rid set to nil also) // -- use exception object // ec = e:GetErrorCode() // es = e:GetMessage() // end //--------------------------------------------------------------------------- You may get my work from: http://www.dynaset.org/dogusanh -- Regards, Hakki Dogusan |
From: Steve K. <ha...@ya...> - 2006-06-20 11:08:53
|
Hi all, I am trying to bind wxSqlite3 to lua and do not know how to use exception in wxlua. wxSqlite3 has an exception class and in c++ the try catch exception. How can I use it in wxlua? Something translated like local db=wxSqlite3DB() db:Open(path) x,y=db:ExecuteQuery(sql) -- if x =nil then y contains error msg. Can I I do it in wxlua binding r I have to manually code it in c++ using lua c api? cheers S.KIEU --------------------------------- On Yahoo!7 Socceroos Central: Latest news, schedule, blogs and videos. |
From: Steve K. <ha...@ya...> - 2006-06-20 10:14:25
|
I believe it is a problem with the garbage collector of 5.1. I cannot seem to find a way to force it to do a GC on "dead" locals. For example I think it is the problem with wxWidget. The similar test but in purely wxWidgets show the same symptoms, and the symtom goes away if I do : Call Destroy() explicitely Or manually delete the pointer (no good) This helps to solve the bug with memory for me. According to wxWidgets docs, it seems no need to call Destroy() after the modal dialog has closed but it seems not right. Suppose for some other widgets as well. I have added to my copy of wxlua 2.6.2 method Destroy for wx.wxDialog, and noticed that it has not been added to the snapshot 2006-06-15, so I thought we should add Destroy() to the bindings as well as wxPanel, wxFrame (top windows level object) with lua50 in 2.6.2 I have test the gc and it seems to work fine. Have a win98 run in vmware with only 16Mb ram and unable to crash it. Have not tested with lua5.1 though. Stiil my apps unstable esp in win2k and a strange combination; use wxLua and luasql from kepler project; and even with luasqlite3. It runs for a while and crash if I do db operations. just a simple write and show the form several times enough to crash it (in win2k pro). I have done many test narrowing down the cause without much success. Just several mins ago I bind wxsqlite3 to wxLua and use it instead of luasql and things seems to be fine. Will test it more to confirm. Now I will have to rewrite the whole database layer using wxsqlite3 instead. To be independent of luasql I can use the latest wxlua which is also a good thing . Thanks for your reply. cheers S.KIEU Send instant messages to your online friends http://au.messenger.yahoo.com |
From: John L. <jla...@gm...> - 2006-06-19 15:52:35
|
On 6/18/06, Steve Kieu <ha...@ya...> wrote: > I am trying to find the reason why my apps is so unstable in win32 and found > which could be a bug, not sure it is in wxLua or lua or even wxWidgets. I > will test with pure wxWidgets to see and post here later on. I believe it is a problem with the garbage collector of 5.1. I cannot seem to find a way to force it to do a GC on "dead" locals. For example for i = 1, 10 do local p = wx.wxPen(wx.wxColour(0,0,0), 1, wx.wxSOLID) --use pen somehow... p:Delete() -- !!!! end If you don't do p:Destroy() you get 10 pens and 10 colours! If you keep going you'll kill any non NT MSWindows system and after ~5000 or so will start to cause redrawing problems in NT (even XP) systems. This means that you need to do local c = wx.wxColour(1,2,3) local p = = wx.wxPen(c, 1, wx.wxSOLID) -- use p somehow p:Delete() c:Delete() Use the wxLuaEdit program, you need wxStEdit from wxCode.sf.net, and run your program and click on "Output" window and use the menu item wxLua->Show Stack. Under the "Tracked Items" you will get a list of the counts of the different wxWidgets structures that wxLua is tracking and waiting to delete. Like I said, I have tried to force the GC to run, but it doesn't do anything. I'll try to find some time later this week to look at it. I think that it has something to do with lua thinking that these structures are just void* and are small. I wonder if there's a way to give a hint to lua about the size and therefore the need to do a GC on them. > I have such simple script to test > > f=wx.wxFrame(wx.wxNull, -1, "Test") > b=wx.wxButton(f, -1, "Test") > > f:ConnectEvent(-1, wx.wxEVT_COMMAND_BUTTON_CLICKED, function (event) > local d=wx.wxDialog(f,-1,"Test") > d:ShowModal(true) d:Destroy() -- ALWAYS DO THIS > end) > f:Show(true) Just explicitly Destroy() it. I believe that you have always have needed to do this. > Now I click the buton ; show the dialog and close the dialog, Run taskmgr > in win32 to see the memory usage is slowly insreasing after each time and > never reduced. Until the memory usesage is about 20Mb the application > crashed,. Sometimes it freezes, need to kill it. > If you have much memory then it takes much longer to crash it, it seems the > problem is related to the garbage collector in lua when it tries to clean up > the grabage. This is serious problem ; happen both with version 2.6.2.0 I > will test the snapshot tonight and see. Hopefully a solution can be found, sorry, but it'll have to be later this week for me. Regards, John Labenski |
From: Steve K. <ha...@ya...> - 2006-06-18 07:44:47
|
Hi all, I am trying to find the reason why my apps is so unstable in win32 and found which could be a bug, not sure it is in wxLua or lua or even wxWidgets. I will test with pure wxWidgets to see and post here later on. I have such simple script to test f=wx.wxFrame(wx.wxNull, -1, "Test") b=wx.wxButton(f, -1, "Test") f:ConnectEvent(-1, wx.wxEVT_COMMAND_BUTTON_CLICKED, function (event) local d=wx.wxDialog(f,-1,"Test") d:ShowModal(true) end) f:Show(true) Now I click the buton ; show the dialog and close the dialog, Run taskmgr in win32 to see the memory usage is slowly insreasing after each time and never reduced. Until the memory usesage is about 20Mb the application crashed,. Sometimes it freezes, need to kill it. If you have much memory then it takes much longer to crash it, it seems the problem is related to the garbage collector in lua when it tries to clean up the grabage. This is serious problem ; happen both with version 2.6.2.0 I will test the snapshot tonight and see. Cheers S.KIEU --------------------------------- On Yahoo!7 360°: Your own space to share what you want with who you want! |
From: Darwin S. <dar...@ho...> - 2006-06-12 19:47:15
|
Yeah that works fine now. Thanks again, Darwin Slattery From: "John Labenski" <jla...@gm...> To: djs...@us..., wxl...@li... Subject: Re: [Wxlua-users] multi-level C++ namespaces Date: Sun, 11 Jun 2006 23:52:08 -0400 On 6/9/06, Darwin Slattery <dar...@ho...> wrote: >Thanks that works great. The naming convention for the namespaces is >perfect. Good. >I have noticed something regarding enumerations declared inside a class in >a >namespace that I just wanted to check with you. > >I have the following declaration: >namespace nsa >{ >class MyClass >{ >public: > enum MyEnum > { > ENUMVAL1 = 10 > }; >}; >} > >The corresponding entry for the enumeration in the .i file is: >%enum nsa::MyClass::MyEnum > %rename nsa_MyClass_ENUMVAL1 MyClass::ENUMVAL1 >%endenum > >I could not put the 'nsa::' before 'MyClass::ENUMVAL1' because it results >in >a compile error saying that nsa::nsa isn't declared. I fixed some things related to this, get a new copy and try this. ie. Don't prepend the namespace on the enum name. %enum nsa::MyClass::MyEnum %rename nsa_MyClass_ENUMVAL1 ENUMVAL1 %rename ENUMVAL2 ENUMVAL2 ENUMVAL3 %endenum results should be (using the wx lua "global" namespace) wx.nsa_MyClass_ENUMVAL1 wx.ENUMVAL2 wx.nsa_MyClass_ENUMVAL3 Regards, John Labenski |
From: John L. <jla...@gm...> - 2006-06-12 03:52:12
|
On 6/9/06, Darwin Slattery <dar...@ho...> wrote: > Thanks that works great. The naming convention for the namespaces is > perfect. Good. > I have noticed something regarding enumerations declared inside a class in a > namespace that I just wanted to check with you. > > I have the following declaration: > namespace nsa > { > class MyClass > { > public: > enum MyEnum > { > ENUMVAL1 = 10 > }; > }; > } > > The corresponding entry for the enumeration in the .i file is: > %enum nsa::MyClass::MyEnum > %rename nsa_MyClass_ENUMVAL1 MyClass::ENUMVAL1 > %endenum > > I could not put the 'nsa::' before 'MyClass::ENUMVAL1' because it results in > a compile error saying that nsa::nsa isn't declared. I fixed some things related to this, get a new copy and try this. ie. Don't prepend the namespace on the enum name. %enum nsa::MyClass::MyEnum %rename nsa_MyClass_ENUMVAL1 ENUMVAL1 %rename ENUMVAL2 ENUMVAL2 ENUMVAL3 %endenum results should be (using the wx lua "global" namespace) wx.nsa_MyClass_ENUMVAL1 wx.ENUMVAL2 wx.nsa_MyClass_ENUMVAL3 Regards, John Labenski |
From: Darwin S. <dar...@ho...> - 2006-06-09 21:30:19
|
Hello, Thanks that works great. The naming convention for the namespaces is perfect. I have noticed something regarding enumerations declared inside a class in a namespace that I just wanted to check with you. I have the following declaration: namespace nsa { class MyClass { public: enum MyEnum { ENUMVAL1 = 10 }; }; } The corresponding entry for the enumeration in the .i file is: %enum nsa::MyClass::MyEnum %rename nsa_MyClass_ENUMVAL1 MyClass::ENUMVAL1 %endenum I could not put the 'nsa::' before 'MyClass::ENUMVAL1' because it results in a compile error saying that nsa::nsa isn't declared. Also when accessing this value within a lua script I use: wxluanstest.nsa_nsa_MyClass_ENUMVAL1 It works fine but I just wanted to check if I'm using this properly. I have attached the source again in case you want to try it out. Thanks again for all your time and help, Darwin Slattery From: "John Labenski" <jla...@gm...> To: djs...@us..., wxl...@li... Subject: Re: [Wxlua-users] multi-level C++ namespaces Date: Thu, 8 Jun 2006 23:10:26 -0400 On 6/8/06, Darwin Slattery <dar...@ho...> wrote: >Thanks for your reply. I think I'm just missing something small here. From >your suggestions it seems that what I'm trying to do is completely possible >in the .i file. Just to clarify one point in your last mail, I'm not >looking >to declare a class within another class declaration - I just want to write >bindings for classes that have been declared in mulit-level namespaces like >nsa::nsb::nsc. It was a very small fix, but in a few different places. In order to make it work you have to use the fully qualified namespace for both the %class and the constructor. The output will be nsa_nsb_MyClass which is reasonable enough, right? It's too much trouble to try to make nested lua "namespaces" like wx.nsa.nsb.MyClass. %class %delete %noclassinfo %encapsulate nsa::nsb::MyClass nsa::nsb::MyClass() %rename nsa_nsb_MyClassFromInt nsa::nsb::MyClass(int x) %constructor nsa_nsb_MyClassFromInt(int x) You use the %rename tag or %constructor tag for alternate constructors, but you must replace the :: with _. >Thank you for your offer of looking at the code. I definitely don't want to >cause any work for you or the team and any suggestions would be >appreciated. >The attached archive has the .i and MyClass header file and I've included a >main driver file and makefile. Thanks for the sample, it really helps and saves me a lot of time when I people give me a nice little sample to work with. The next snapshot will contain the fixed binding generator. Regards, John Labenski |
From: John L. <jla...@gm...> - 2006-06-09 17:25:41
|
On 6/9/06, Francesco Montorsi <f18...@ya...> wrote: > Hi, > > ld...@tu... ha scritto: > > ../modules/wxbind/src/wx_bind.cpp:4061: error: `wxHandleFatalExceptions' > > undeclared (first use this function) > > ../modules/wxbind/src/wx_bind.cpp:4061: error: (Each undeclared > > identifier is reported only once for each function it appears in.) > > ../modules/wxbind/src/wx_bind.cpp:3017: confused by earlier errors, > > bailing out > John, probably the following > > #include <wx/utils.h> > > line should be added to get definition of that function... It's included, but I think the problem is wxUSE_ON_FATAL_EXCEPTION if not set for this compiler. I've added the check and it should work now. Regards, John Labenski |
From: John L. <jla...@gm...> - 2006-06-09 15:06:52
|
On 6/9/06, Steve Kieu <ha...@ya...> wrote: > All right, I fixed this but not understand why ; You may have the answer > though lol > > What I did is; after comapring liles by lines with wxLua.cpp then add > extern bool wxLuaBinding_wxstc_init(); > and init it of course > wxLuaBinding_wxstc_init(); > > as I saw that is the only main difference between wxlua and my exe file. > Result: No longer the f*** message > > wxLua: Memory allocation error > > in any script it runs. > > Why I need stc where I did not use any of them in lua script. And why this > error only happen in win98? It is mysterious. That is so bizarre! If you don't want the stc lib then just don't link to it and remove the init function call. I can't for the life of me think why there would be a problem if you link to it, but don't actually use it. > Thank you for your replies now I can sleep well tonight :-) :) If you ever figure out what the problem is please tell us! Thanks, John Labenski |
From: <ld...@tu...> - 2006-06-09 11:44:12
|
Francesco, thank you |
From: Francesco M. <f18...@ya...> - 2006-06-09 11:28:45
|
Hi, ld...@tu... ha scritto: > ../modules/wxbind/src/wx_bind.cpp:4061: error: `wxHandleFatalExceptions' > undeclared (first use this function) > ../modules/wxbind/src/wx_bind.cpp:4061: error: (Each undeclared > identifier is reported only once for each function it appears in.) > ../modules/wxbind/src/wx_bind.cpp:3017: confused by earlier errors, > bailing out John, probably the following #include <wx/utils.h> line should be added to get definition of that function... > and continue compiling I get error > > $ make > (cd ./modules/ && make ) > make[1]: Entering directory `/home/Ldn/wxLua/modules' > .././bk-deps g++ -c -o wxbind_dll_wx_bind.o -I../modules/wxbind/setup > -I../modules -I./.. -DWXMAKINGDLL_WXBIND > -I/usr/local/lib/wx/include/msw-ansi-release-2.6 > -I/usr/local/include/wx-2.6 -D__WXMSW__ -mthreads -DWXUSINGDLL=1 > -DNO_GCC_PRAGMA -g0 -O2 ../modules/wxbind/src/wx_bind.cpp > ../modules/wxbind/src/wx_bind.cpp: In function `WXLUAOBJECT* > wxLuaGetObjectList_wx(size_t&)': > ../modules/wxbind/src/wx_bind.cpp:3017: internal compiler error: > output_operand: invalid expression as operand > Please submit a full bug report, > with preprocessed source if appropriate. > See <URL:http://www.mingw.org/bugs.shtml> for instructions. This is a known problem with GCC 3.4 - I submitted a bug report to mingw as the error message says to do and the reply was: it's a GCC bug which has been fixed in GCC 4. Thus if you want to use Mingw, you need to upgrade it to the development version... Francesco |