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
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
|
|
1
|
2
(7) |
3
(1) |
4
|
5
(3) |
6
(17) |
7
(2) |
8
|
9
(1) |
10
|
11
(1) |
12
(15) |
13
(6) |
14
(6) |
15
(3) |
16
|
17
(1) |
18
|
19
|
20
|
21
|
22
|
23
|
24
(3) |
25
(4) |
26
(17) |
27
(5) |
28
(9) |
29
|
30
(4) |
From: Duncan C. <dun...@gm...> - 2007-06-30 20:01:52
|
Excellent, I've been looking forward to this. Thank you! One thing though, it looks like wxMediaCtrl is still absent from the default setup - I asked about this a while ago and I think you said it was wrapped but not by default available because of a library dependency, but it wouldn't be much of a problem to add that library in - did your view change on that? On 6/30/07, John Labenski <jla...@gm...> wrote: > wxLua is a Lua scripting language wrapper around the wxWidgets > cross-platform GUI library. It consists of two IDE type editors that > can edit and run lua programs (wxLua and wxLuaEdit), an executable for > running standalone wxLua scripts (wxLuaFreeze), a lua module to load > using "require" when using the standard lua executable, and a library > for extending C++ programs with a fast, small, fully embeddable > scripting language. > > http://wxlua.sourceforge.net > http://www.lua.org > > Please see the reference manual to see what wxLua wraps. > http://wxlua.sourceforge.net/docs/wxluaref.html > > There have been many significant changes to wxLua to improve speed, > reliability, and consistency in the function names. Please see the > changelog for more information about this release. > > http://wxlua.cvs.sourceforge.net/wxlua/wxLua/docs/changelog.txt?revision=1.39&view=markup > > Of particular note for this release are: > bindings.wx.lua - Explore the data that is used to create the bindings for wxLua > controls.wx.lua - See every control that wxLua wraps and EVERY event > they generate. > New and much better stack dialog! > Many - many more classes. > > A source, MSW binary executable, and MSW DLL release are provided. > > Regards, > John Labenski > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > wxlua-users mailing list > wxl...@li... > https://lists.sourceforge.net/lists/listinfo/wxlua-users > |
From: Ryan P. <rpu...@gm...> - 2007-06-30 19:47:47
|
On 6/30/07, John Labenski <jla...@gm...> wrote: > > wxLua is a Lua scripting language wrapper around the wxWidgets > cross-platform GUI library. It consists of two IDE type editors that > can edit and run lua programs (wxLua and wxLuaEdit), an executable for > running standalone wxLua scripts (wxLuaFreeze), a lua module to load > using "require" when using the standard lua executable, and a library > for extending C++ programs with a fast, small, fully embeddable > scripting language. > > http://wxlua.sourceforge.net > http://www.lua.org > > Please see the reference manual to see what wxLua wraps. > http://wxlua.sourceforge.net/docs/wxluaref.html > > There have been many significant changes to wxLua to improve speed, > reliability, and consistency in the function names. Please see the > changelog for more information about this release. > > > http://wxlua.cvs.sourceforge.net/wxlua/wxLua/docs/changelog.txt?revision=1.39&view=markup > > Of particular note for this release are: > bindings.wx.lua - Explore the data that is used to create the bindings for > wxLua > controls.wx.lua - See every control that wxLua wraps and EVERY event > they generate. > New and much better stack dialog! > Many - many more classes. > > A source, MSW binary executable, and MSW DLL release are provided. > > Regards, > John Labenski This is great news. It is time for me to try and use wxLua on a big project. The changelog is massive. Nice work. -- Regards, Ryan RJP Computing |
From: John L. <jla...@gm...> - 2007-06-30 19:26:17
|
wxLua is a Lua scripting language wrapper around the wxWidgets cross-platform GUI library. It consists of two IDE type editors that can edit and run lua programs (wxLua and wxLuaEdit), an executable for running standalone wxLua scripts (wxLuaFreeze), a lua module to load using "require" when using the standard lua executable, and a library for extending C++ programs with a fast, small, fully embeddable scripting language. http://wxlua.sourceforge.net http://www.lua.org Please see the reference manual to see what wxLua wraps. http://wxlua.sourceforge.net/docs/wxluaref.html There have been many significant changes to wxLua to improve speed, reliability, and consistency in the function names. Please see the changelog for more information about this release. http://wxlua.cvs.sourceforge.net/wxlua/wxLua/docs/changelog.txt?revision=1.39&view=markup Of particular note for this release are: bindings.wx.lua - Explore the data that is used to create the bindings for wxLua controls.wx.lua - See every control that wxLua wraps and EVERY event they generate. New and much better stack dialog! Many - many more classes. A source, MSW binary executable, and MSW DLL release are provided. Regards, John Labenski |
From: John L. <jla...@gm...> - 2007-06-30 00:08:49
|
I have changed the operators += and friends from "op_add_assign" to just "op_iadd" as python has, where "i" stands for "inplace". Additionally the "=" operator is now just "op_set" instead of "op_assign". I doubt this affects anyone as they there weren't many of them, but there will be. Anyone think of better names? Currently they're similar to the names the python uses, but without the extra ugly underscores (__eq__). It would be nice to just have a single leading underscore "_eq", but that is currently used to designate that the base class function should be called. Logic could be written to differentiate between them, but it'd have to be run every time for an operator call and slow things down... maybe it wouldn't be a big deal and the single underscore seems a little more elegant... any thoughts about this? Regards, John Labenski "==" = "op_eq" "!=" = "op_ne" "<" = "op_lt" ">" = "op_gt" "<=" = "op_le" ">=" = "op_ge" "|" = "op_or" "&" = "op_and" "||" = "op_lor" note: "lor" stands for logical (boolean) or, same for "land." "&&" = "op_land" "!" = "op_not" "^" = "op_xor" "++" = "op_inc" "--" = "op_dec" "- (unary)" = "op_neg" "=" = op_set "+" = "op_add" "-" = "op_sub" "*" = "op_mul" "/" = "op_div" "+=" = "op_iadd" note: ixxx stands for "inplace" as it modifies the original object. "-=" = "op_isub" "*=" = "op_imul" "/=" = "op_idiv" "%=" = "op_imod" "&=" = "op_iand" "|=" = "op_ior" "^=" = "op_ixor" |
From: John L. <jla...@gm...> - 2007-06-28 21:51:12
|
On 6/28/07, Klaas Holwerda <db...@nl...> wrote: > Hi John, > > I found that on windows it did work, so started all over again on Linux with a clean build, which solved it. > I think it must have bin a linking issue. > Still thanks for the handy tips. > > I extended for my app the following line in bindings.wx.lua, to see my own bindings: > > wxlua_tables = { "wxlua", "wx", "wxstc", "wxart2d" } I've been meaning to change it so that there's only one function to get at them and you don't have to search for them. Just get the new copy of bindings.wx.lua and you won't have to edit it. See "wxlua.GetBindings()" now in wxluaref.html -John Labenski |
From: John L. <jla...@gm...> - 2007-06-28 20:50:55
|
On 6/28/07, Klaas Holwerda <db...@nl...> wrote: > Hi, > > I downloaded wxstedit-1.2.4.tar.gz. Use the CVS version to get the right libs. I'll try to make to make a wxstedit release this weekend. Regards, -John Labenski |
From: Hakki D. <dog...@tr...> - 2007-06-28 15:25:52
|
Hi, John Labenski wrote: > On 6/28/07, Hakki Dogusan <dog...@tr...> wrote: > > Ok, what about this... (lets pass on the XXXSelectorPrompts since they > seem to work now.) > > Before the struct, put this (preferred) > > wxEventType* wxLUA_EVT_COMMAND_FILEPICKER_CHANGED = > &wxEVT_COMMAND_FILEPICKER_CHANGED; > Nope. ICE - message changed to segmentation error. > or maybe just this > > wxEventType wxLUA_EVT_COMMAND_FILEPICKER_CHANGED = > wxEVT_COMMAND_FILEPICKER_CHANGED; > This one worked :) I added line ~71: wxEventType wxLUA_EVT_COMMAND_FILEPICKER_CHANGED = wxEVT_COMMAND_FILEPICKER_CHANGED; wxEventType wxLUA_EVT_COMMAND_DIRPICKER_CHANGED = wxEVT_COMMAND_DIRPICKER_CHANGED; And changed usage: { "wxEVT_COMMAND_DIRPICKER_CHANGED", &wxLUA_EVT_COMMAND_DIRPICKER_CHANGED, &s_wxluatag_wxFileDirPickerEvent }, { "wxEVT_COMMAND_FILEPICKER_CHANGED", &wxLUA_EVT_COMMAND_FILEPICKER_CHANGED, &s_wxluatag_wxFileDirPickerEvent }, > or even > > wxEventType& wxLUA_EVT_COMMAND_FILEPICKER_CHANGED = > wxEVT_COMMAND_FILEPICKER_CHANGED; > > > Then use the "local" variable in the struct (as appropriate for what > you use above) > > { "wxEVT_COMMAND_FILEPICKER_CHANGED", > wxLUA_EVT_COMMAND_FILEPICKER_CHANGED, > > There's a hack for mingw for wxDefaultPosition and wxDefaultSize at > the top of modules/wxbind/src/wx_bind.cpp that does something similar > and it even has the same error right? > > // FIX: "internal compiler error: output_operand: invalid expression as operand" > > ------------- > > Other than that, I'm afraid that we simply have to be #ifdef > !MINGW3.4.5, unless you can think of something else. Is there > something that MingW defines that we can use as a check, instead of > the obviously wrong MINGW3.4.5 above? > ps. Please remove WXDLLIMPEXP_WXLUA from following functions: warning: inline function `wxString lua2wx(const char*)' declared as dllimport: attribute ignored warning: inline function `const wx CharBuffer wx2lua(const wxString&)' declared as dllimport: attribute ignored warning: inline function `void wx lua_terror(lua_State*, const wxString&)' declared as dllimport: attribute ignored > Thanks, > John Labenski > -- Regards, Hakki Dogusan |
From: Klaas H. <db...@nl...> - 2007-06-28 15:25:23
|
Hi John, I found that on windows it did work, so started all over again on Linux with a clean build, which solved it. I think it must have bin a linking issue. Still thanks for the handy tips. I extended for my app the following line in bindings.wx.lua, to see my own bindings: wxlua_tables = { "wxlua", "wx", "wxstc", "wxart2d" } Next just run the script from my app, really nice! Thanks, Klaas John Labenski wrote: > > This looks right too, try this to show if they're installed > > for k, v in pairs(wx.a2dRestrictionEngine) do print(k, v) end > > or if you link the wxluasocket library, run this to show all of the > items in the lua _G (global) table. > > wxlua.LuaStackDialog() > > or run samples/bindings.wx.lua to look a little closer at the bindings. > > and... check that they're actually installed, they should be in the > cpp file generated with the same name as the .i file where you > declared the %class a2dRestrictionEngine. Probably just grep for the > enums to see if they're there. -- Unclassified |
From: John L. <jla...@gm...> - 2007-06-28 13:53:50
|
On 6/28/07, Hakki Dogusan <dog...@tr...> wrote: > Hi, > > John Labenski wrote: > > On 6/27/07, Hakki Dogusan <dog...@tr...> wrote: > [snip] > > Does this work? > > > > { "wxEVT_COMMAND_FILEPICKER_CHANGED", > > (const wxEventType*)&wxEVT_COMMAND_FILEPICKER_CHANGED, > > > > No. ICE. > > > or > > > > &((const wxEventType)wxEVT_COMMAND_FILEPICKER_CHANGED), > > Ok, what about this... (lets pass on the XXXSelectorPrompts since they seem to work now.) Before the struct, put this (preferred) wxEventType* wxLUA_EVT_COMMAND_FILEPICKER_CHANGED = &wxEVT_COMMAND_FILEPICKER_CHANGED; or maybe just this wxEventType wxLUA_EVT_COMMAND_FILEPICKER_CHANGED = wxEVT_COMMAND_FILEPICKER_CHANGED; or even wxEventType& wxLUA_EVT_COMMAND_FILEPICKER_CHANGED = wxEVT_COMMAND_FILEPICKER_CHANGED; Then use the "local" variable in the struct (as appropriate for what you use above) { "wxEVT_COMMAND_FILEPICKER_CHANGED", wxLUA_EVT_COMMAND_FILEPICKER_CHANGED, There's a hack for mingw for wxDefaultPosition and wxDefaultSize at the top of modules/wxbind/src/wx_bind.cpp that does something similar and it even has the same error right? // FIX: "internal compiler error: output_operand: invalid expression as operand" ------------- Other than that, I'm afraid that we simply have to be #ifdef !MINGW3.4.5, unless you can think of something else. Is there something that MingW defines that we can use as a check, instead of the obviously wrong MINGW3.4.5 above? Thanks, John Labenski |
From: John L. <jla...@gm...> - 2007-06-28 13:43:54
|
On 6/28/07, Klaas Holwerda <db...@nl...> wrote: > Hi, > > I have in my binding file: > > %class %noclassinfo a2dRestrictionEngine, a2dEvtHandler > %endclass > > %enum a2dRestrictionEngine::a2dSnapToWhat > snapToGridPosX > snapToGridPosY > snapToGridPos > %endenum This looks ok. > And i thought it should now be used like this: > > cmdh:SetSnapFeatures( > wx.a2dRestrictionEngine.snapToGridPos + wx.a2dRestrictionEngine.snapToPinsUnconnected + > wx.a2dRestrictionEngine.snapToObjectPos + wx.a2dRestrictionEngine.snapToObjectVertexes ) > > But i get an "attempt to perfrom arithmetic on field snapToGridPos ( a nil value ). > Obviously it does not understand that snapToGridPos is something, but i don't understand how to fix it. > > Any ideas? This looks right too, try this to show if they're installed for k, v in pairs(wx.a2dRestrictionEngine) do print(k, v) end or if you link the wxluasocket library, run this to show all of the items in the lua _G (global) table. wxlua.LuaStackDialog() or run samples/bindings.wx.lua to look a little closer at the bindings. and... check that they're actually installed, they should be in the cpp file generated with the same name as the .i file where you declared the %class a2dRestrictionEngine. Probably just grep for the enums to see if they're there. -John Labenski |
From: Klaas H. <db...@nl...> - 2007-06-28 12:31:03
|
Hi, I have in my binding file: %class %noclassinfo a2dRestrictionEngine, a2dEvtHandler %endclass %enum a2dRestrictionEngine::a2dSnapToWhat snapToGridPosX snapToGridPosY snapToGridPos %endenum I did use it like this in the lua script: cmdh:SetSnapFeatures( wx.a2dRestrictionEngine_snapToGridPos + wx.a2dRestrictionEngine_snapToPinsUnconnected + wx.a2dRestrictionEngine_snapToObjectPos + wx.a2dRestrictionEngine_snapToObjectVertexes ) And i thought it should now be used like this: cmdh:SetSnapFeatures( wx.a2dRestrictionEngine.snapToGridPos + wx.a2dRestrictionEngine.snapToPinsUnconnected + wx.a2dRestrictionEngine.snapToObjectPos + wx.a2dRestrictionEngine.snapToObjectVertexes ) But i get an "attempt to perfrom arithmetic on field snapToGridPos ( a nil value ). Obviously it does not understand that snapToGridPos is something, but i don't understand how to fix it. Any ideas? Thanks, Klaas -- Unclassified |
From: Hakki D. <dog...@tr...> - 2007-06-28 12:15:42
|
Hi, John Labenski wrote: > On 6/27/07, Hakki Dogusan <dog...@tr...> wrote: [snip] > Does this work? > > { "wxEVT_COMMAND_FILEPICKER_CHANGED", > (const wxEventType*)&wxEVT_COMMAND_FILEPICKER_CHANGED, > No. ICE. > or > > &((const wxEventType)wxEVT_COMMAND_FILEPICKER_CHANGED), > No. error: non-lvalue in unary `&' >>>> [wxLuaGetStringList_wx] >>>> { "wxDirSelectorPromptStr", wxDirSelectorPromptStr }, >>>> { "wxFileSelectorPromptStr", wxFileSelectorPromptStr }, >>> If it doesn't fail on wxFileSelectorDefaultWildcardStr, which is >>> declared exactly like the two above, then I dunno. >> Want to hear something more confusing? Code compiles with static >> configuration (I'm building ds284u.dll with adding wxLua sources to >> Code::Blocks project, and using wx as static lib). > > I changed the two above to explicitly use wxT("whatever wxWidgets uses") > > To be sure, this does not work? > > { "wxDirSelectorPromptStr", (const wxChar*)wxDirSelectorPromptStr }, > No. ICE. >> But Mingw's official compiler is gcc-3.4.5; IMHO, It would be good to >> find a solution/workaround.. > > Ok. > >> It seems you forgot to update wxLocale::GetString functions for .c_str >> thing.. :) > > Fixed now. > Thanks. > Regards, > John Labenski > -- Regards, Hakki Dogusan |
From: Klaas H. <db...@nl...> - 2007-06-28 07:52:00
|
Hi, I downloaded wxstedit-1.2.4.tar.gz. But get this error in config.log. configure:5972: checking if wxStEdit (version >= 1.2.4) is available configure:6012: g++ -o conftest -O2 -I/usr/local/lib/wx/include/gtk2-ansi-release-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ conftest.cpp -lwxcode_gtk2_stedit-2.8 -lwx_gtk2_stc-2.8 -L/usr/local/lib -pthread -lwx_gtk2_xrc-2.8 -lwx_gtk2_html-2.8 -lwx_gtk2_adv-2.8 -lwx_base_net-2.8 -lwx_base_xml-2.8 -lwx_gtk2_core-2.8 -lwx_base-2.8 >&5 /usr/bin/ld: cannot find -lwxcode_gtk2_stedit-2.8 The library produced by wxstedit is called libwx_gtk2_stedit-2.8. I think it should be wxcode_gtk2_stedit-2.8, and wxLua is right. And as far as i rememeber it was like when taking wxstedit from CVS. Where is the error? Klaas -- Unclassified |
From: John L. <jla...@gm...> - 2007-06-27 15:54:17
|
On 6/27/07, Hakki Dogusan <dog...@tr...> wrote: > Hi, > > John Labenski wrote: > > On 6/27/07, Hakki Dogusan <dog...@tr...> wrote: > >> Ok, narrowed more.. If I uncomment one of them compiler dies. I tried to > >> simplify #if front of them, but didn't succeded. > >> > >> [wxLuaGetEventList_wx] > >> { "wxEVT_COMMAND_DIRPICKER_CHANGED", &wxEVT_COMMAND_DIRPICKER_CHANGED, > >> &s_wxluatag_wxFileDirPickerEvent }, > >> { "wxEVT_COMMAND_FILEPICKER_CHANGED", &wxEVT_COMMAND_FILEPICKER_CHANGED, > >> &s_wxluatag_wxFileDirPickerEvent }, > > > > These look like they're defined in the same way as any other event. I really don't know about this... DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_CORE, wxEVT_COMMAND_DIRPICKER_CHANGED, 1103) DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_CORE, wxEVT_COMMAND_FILEPICKER_CHANGED, 1102) Why would this work? (note 1102 isn't used anyway) DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_CORE, wxEVT_COMMAND_COLOURPICKER_CHANGED, 1102) Does this work? { "wxEVT_COMMAND_FILEPICKER_CHANGED", (const wxEventType*)&wxEVT_COMMAND_FILEPICKER_CHANGED, or &((const wxEventType)wxEVT_COMMAND_FILEPICKER_CHANGED), > >> [wxLuaGetStringList_wx] > >> { "wxDirSelectorPromptStr", wxDirSelectorPromptStr }, > >> { "wxFileSelectorPromptStr", wxFileSelectorPromptStr }, > > > > If it doesn't fail on wxFileSelectorDefaultWildcardStr, which is > > declared exactly like the two above, then I dunno. > > Want to hear something more confusing? Code compiles with static > configuration (I'm building ds284u.dll with adding wxLua sources to > Code::Blocks project, and using wx as static lib). I changed the two above to explicitly use wxT("whatever wxWidgets uses") To be sure, this does not work? { "wxDirSelectorPromptStr", (const wxChar*)wxDirSelectorPromptStr }, > But Mingw's official compiler is gcc-3.4.5; IMHO, It would be good to > find a solution/workaround.. Ok. > It seems you forgot to update wxLocale::GetString functions for .c_str > thing.. :) Fixed now. Regards, John Labenski |
From: Hakki D. <dog...@tr...> - 2007-06-27 15:03:21
|
Hi, John Labenski wrote: > On 6/27/07, Hakki Dogusan <dog...@tr...> wrote: >> Ok, narrowed more.. If I uncomment one of them compiler dies. I tried to >> simplify #if front of them, but didn't succeded. >> >> [wxLuaGetEventList_wx] >> { "wxEVT_COMMAND_DIRPICKER_CHANGED", &wxEVT_COMMAND_DIRPICKER_CHANGED, >> &s_wxluatag_wxFileDirPickerEvent }, >> { "wxEVT_COMMAND_FILEPICKER_CHANGED", &wxEVT_COMMAND_FILEPICKER_CHANGED, >> &s_wxluatag_wxFileDirPickerEvent }, > > These look like they're defined in the same way as any other event. > >> [wxLuaGetStringList_wx] >> { "wxDirSelectorPromptStr", wxDirSelectorPromptStr }, >> { "wxFileSelectorPromptStr", wxFileSelectorPromptStr }, > > If it doesn't fail on wxFileSelectorDefaultWildcardStr, which is > declared exactly like the two above, then I dunno. > Want to hear something more confusing? Code compiles with static configuration (I'm building ds284u.dll with adding wxLua sources to Code::Blocks project, and using wx as static lib). > You said that you're ok using gcc 4.X. Thanks for tracking these down, > lets just leave it because I don't know what could be the problem. If > for some reason someone *really* wants to use the 3.X version we'll > have these messages to start from, but I think the only solution may > be to either remove them or replace with with wxT("What the string > really is."). > But Mingw's official compiler is gcc-3.4.5; IMHO, It would be good to find a solution/workaround.. >> ps. there are #endif lines without a #if in gdi.cpp (new from cvs) > > Oops, that was a bug in the code generated for %members. Fixed now, > surprisingly, the gcc 4.? that I use in Linux didn't even warn about > them. > Thanks. It seems you forgot to update wxLocale::GetString functions for .c_str thing.. :) > Thanks, > John Labenski > -- Regards, Hakki Dogusan |
From: John L. <jla...@gm...> - 2007-06-27 14:29:05
|
On 6/27/07, Hakki Dogusan <dog...@tr...> wrote: > > Ok, narrowed more.. If I uncomment one of them compiler dies. I tried to > simplify #if front of them, but didn't succeded. > > [wxLuaGetEventList_wx] > { "wxEVT_COMMAND_DIRPICKER_CHANGED", &wxEVT_COMMAND_DIRPICKER_CHANGED, > &s_wxluatag_wxFileDirPickerEvent }, > { "wxEVT_COMMAND_FILEPICKER_CHANGED", &wxEVT_COMMAND_FILEPICKER_CHANGED, > &s_wxluatag_wxFileDirPickerEvent }, These look like they're defined in the same way as any other event. > [wxLuaGetStringList_wx] > { "wxDirSelectorPromptStr", wxDirSelectorPromptStr }, > { "wxFileSelectorPromptStr", wxFileSelectorPromptStr }, If it doesn't fail on wxFileSelectorDefaultWildcardStr, which is declared exactly like the two above, then I dunno. You said that you're ok using gcc 4.X. Thanks for tracking these down, lets just leave it because I don't know what could be the problem. If for some reason someone *really* wants to use the 3.X version we'll have these messages to start from, but I think the only solution may be to either remove them or replace with with wxT("What the string really is."). > ps. there are #endif lines without a #if in gdi.cpp (new from cvs) Oops, that was a bug in the code generated for %members. Fixed now, surprisingly, the gcc 4.? that I use in Linux didn't even warn about them. Thanks, John Labenski |
From: Hakki D. <dog...@tr...> - 2007-06-27 09:47:19
|
Hi, John Labenski wrote: > On 6/26/07, Hakki Dogusan <dog...@tr...> wrote: >> Hi, >> >> Exact positions are: >>[snip] > > And if you just leave wxEVT_COMMAND_DIRPICKER_CHANGED as the only > unremmed item it doesn't work? ? What about commenting parts of the > #if statement to narrow things down a little or simplify it for the > preprocessor. I'd guess the wxEVT_COMMAND_ENTER does work. > > I looked at how all the bits above are declared, but they're no > different than anything else. > >>[snip] > > I'd guess that the compiler doesn't like wxDirSelectorPromptStr, > wxFileSelectorDefaultWildcardStr, and wxFileSelectorPromptStr while > the others are ok. Is this true? Can you just leave any one of them > unremmed and it fails? > > What if you rem everything else and just have this single line? > > { "wxDirSelectorPromptStr", (const wxChar*)wxDirSelectorPromptStr }, > > > Thanks for helping, I can't see anything obviously wrong so if you > could narrow it down even further that's be great. Ok, narrowed more.. If I uncomment one of them compiler dies. I tried to simplify #if front of them, but didn't succeded. [wxLuaGetEventList_wx] { "wxEVT_COMMAND_DIRPICKER_CHANGED", &wxEVT_COMMAND_DIRPICKER_CHANGED, &s_wxluatag_wxFileDirPickerEvent }, { "wxEVT_COMMAND_FILEPICKER_CHANGED", &wxEVT_COMMAND_FILEPICKER_CHANGED, &s_wxluatag_wxFileDirPickerEvent }, [wxLuaGetStringList_wx] { "wxDirSelectorPromptStr", wxDirSelectorPromptStr }, { "wxFileSelectorPromptStr", wxFileSelectorPromptStr }, ps. there are #endif lines without a #if in gdi.cpp (new from cvs) > John Labenski > -- Regards, Hakki Dogusan |
From: John L. <jla...@gm...> - 2007-06-27 01:59:44
|
On 6/26/07, Hakki Dogusan <dog...@tr...> wrote: > Hi, > > Exact positions are: > > wxLuaBindEvent* wxLuaGetEventList_wx(size_t &count) > { > static wxLuaBindEvent eventList[] = > { > /*hd... > #if (wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxPicker) && > ((wxLUA_USE_wxDirPickerCtrl || wxLUA_USE_wxFilePickerCtrl ) && > (wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL )) > { "wxEVT_COMMAND_DIRPICKER_CHANGED", > &wxEVT_COMMAND_DIRPICKER_CHANGED, &s_wxluatag_wxFileDirPickerEvent }, > #endif // (wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxPicker) && > ((wxLUA_USE_wxDirPickerCtrl || wxLUA_USE_wxFilePickerCtrl ) && > (wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL )) > > { "wxEVT_COMMAND_ENTER", &wxEVT_COMMAND_ENTER, > &s_wxluatag_wxCommandEvent }, > > #if (wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxPicker) && > ((wxLUA_USE_wxDirPickerCtrl || wxLUA_USE_wxFilePickerCtrl ) && > (wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL )) > { "wxEVT_COMMAND_FILEPICKER_CHANGED", > &wxEVT_COMMAND_FILEPICKER_CHANGED, &s_wxluatag_wxFileDirPickerEvent }, > #endif // (wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxPicker) && > ((wxLUA_USE_wxDirPickerCtrl || wxLUA_USE_wxFilePickerCtrl ) && > (wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL )) > */ And if you just leave wxEVT_COMMAND_DIRPICKER_CHANGED as the only unremmed item it doesn't work? ? What about commenting parts of the #if statement to narrow things down a little or simplify it for the preprocessor. I'd guess the wxEVT_COMMAND_ENTER does work. I looked at how all the bits above are declared, but they're no different than anything else. > wxLuaBindString* wxLuaGetStringList_wx(size_t &count) > { > static wxLuaBindString stringList[] = > { > /*hd... > { "wxDirSelectorPromptStr", wxDirSelectorPromptStr }, > { "wxFILE_SEP_DSK", wxT(":") }, > { "wxFILE_SEP_EXT", wxT(".") }, > { "wxFILE_SEP_PATH", wxLua_FILE_SEP_PATH }, > { "wxFILE_SEP_PATH_DOS", wxT("\\") }, > { "wxFILE_SEP_PATH_MAC", wxT(":") }, > { "wxFILE_SEP_PATH_UNIX", wxT("/") }, > { "wxFILE_SEP_PATH_VMS", wxT(".") }, > > #if wxLUA_USE_wxFileDialog && wxUSE_FILEDLG > { "wxFileSelectorDefaultWildcardStr", > wxFileSelectorDefaultWildcardStr }, > { "wxFileSelectorPromptStr", wxFileSelectorPromptStr }, > #endif // wxLUA_USE_wxFileDialog && wxUSE_FILEDLG > */ I'd guess that the compiler doesn't like wxDirSelectorPromptStr, wxFileSelectorDefaultWildcardStr, and wxFileSelectorPromptStr while the others are ok. Is this true? Can you just leave any one of them unremmed and it fails? What if you rem everything else and just have this single line? { "wxDirSelectorPromptStr", (const wxChar*)wxDirSelectorPromptStr }, Thanks for helping, I can't see anything obviously wrong so if you could narrow it down even further that's be great. John Labenski |
From: Hakki D. <dog...@tr...> - 2007-06-26 23:47:47
|
Hi, John Labenski wrote: > On 6/26/07, Hakki Dogusan <dog...@tr...> wrote: >>> What about just this? Remove the IsEmpty and NULL. Does it work just >>> using c_str()? >> No, it didn't work. ( "" != NULL Isn't it?) > > It should be the same. > const char* str = ""; > should be the same as > const char* str = {0}; > since strings are always NULL terminated. > > Maybe w_char (for unicode) is different, but IIRC unicode (utf16 at > least) just uses two NULLS as a termination? > > Anyway, I applied a fix using "str.IsEmpty() ? NULL : str.c_str()" > >> BTW, I'm testing for gcc-3.4.5 now. Compiler dies at static struct >> definitions while compiling wx_bind.cpp. >> >> To see, I commented following, and it compiles: >> >> static wxLuaBindEvent eventList[] = { >> /* ... */ >> { 0, 0, 0 }, >> }; > > And if you comment out the first and then the second half of the > arrays it doesn't work? I'd guess that one of the elements is > problematic or that there's too many #if statements. > Exact positions are: wxLuaBindEvent* wxLuaGetEventList_wx(size_t &count) { static wxLuaBindEvent eventList[] = { ... /*hd... #if (wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxPicker) && ((wxLUA_USE_wxDirPickerCtrl || wxLUA_USE_wxFilePickerCtrl ) && (wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL )) { "wxEVT_COMMAND_DIRPICKER_CHANGED", &wxEVT_COMMAND_DIRPICKER_CHANGED, &s_wxluatag_wxFileDirPickerEvent }, #endif // (wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxPicker) && ((wxLUA_USE_wxDirPickerCtrl || wxLUA_USE_wxFilePickerCtrl ) && (wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL )) { "wxEVT_COMMAND_ENTER", &wxEVT_COMMAND_ENTER, &s_wxluatag_wxCommandEvent }, #if (wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxPicker) && ((wxLUA_USE_wxDirPickerCtrl || wxLUA_USE_wxFilePickerCtrl ) && (wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL )) { "wxEVT_COMMAND_FILEPICKER_CHANGED", &wxEVT_COMMAND_FILEPICKER_CHANGED, &s_wxluatag_wxFileDirPickerEvent }, #endif // (wxCHECK_VERSION(2,8,0) && wxLUA_USE_wxPicker) && ((wxLUA_USE_wxDirPickerCtrl || wxLUA_USE_wxFilePickerCtrl ) && (wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL )) */ ... { 0, 0, 0 }, }; count = sizeof(eventList)/sizeof(wxLuaBindEvent) - 1; return eventList; } wxLuaBindString* wxLuaGetStringList_wx(size_t &count) { static wxLuaBindString stringList[] = { ... /*hd... { "wxDirSelectorPromptStr", wxDirSelectorPromptStr }, { "wxFILE_SEP_DSK", wxT(":") }, { "wxFILE_SEP_EXT", wxT(".") }, { "wxFILE_SEP_PATH", wxLua_FILE_SEP_PATH }, { "wxFILE_SEP_PATH_DOS", wxT("\\") }, { "wxFILE_SEP_PATH_MAC", wxT(":") }, { "wxFILE_SEP_PATH_UNIX", wxT("/") }, { "wxFILE_SEP_PATH_VMS", wxT(".") }, #if wxLUA_USE_wxFileDialog && wxUSE_FILEDLG { "wxFileSelectorDefaultWildcardStr", wxFileSelectorDefaultWildcardStr }, { "wxFileSelectorPromptStr", wxFileSelectorPromptStr }, #endif // wxLUA_USE_wxFileDialog && wxUSE_FILEDLG */ ... { 0, 0 }, }; count = sizeof(stringList)/sizeof(wxLuaBindString) - 1; return stringList; } > Thanks, > John Labenski > -- Regards, Hakki Dogusan |
From: John L. <jla...@gm...> - 2007-06-26 22:45:48
|
On 6/26/07, Hakki Dogusan <dog...@tr...> wrote: > > > > What about just this? Remove the IsEmpty and NULL. Does it work just > > using c_str()? > > No, it didn't work. ( "" != NULL Isn't it?) It should be the same. const char* str = ""; should be the same as const char* str = {0}; since strings are always NULL terminated. Maybe w_char (for unicode) is different, but IIRC unicode (utf16 at least) just uses two NULLS as a termination? Anyway, I applied a fix using "str.IsEmpty() ? NULL : str.c_str()" > BTW, I'm testing for gcc-3.4.5 now. Compiler dies at static struct > definitions while compiling wx_bind.cpp. > > To see, I commented following, and it compiles: > > static wxLuaBindEvent eventList[] = { > /* ... */ > { 0, 0, 0 }, > }; And if you comment out the first and then the second half of the arrays it doesn't work? I'd guess that one of the elements is problematic or that there's too many #if statements. Thanks, John Labenski |
From: John L. <jla...@gm...> - 2007-06-26 22:38:30
|
On 6/26/07, Andre <ar...@ki...> wrote: > needs setup.h to be within \wxWidgets\include\wx other projects use the platform > directory. Please be a lot more clear. What needs setup.h to be...? I'm guessing you're talking about wxLua/modules/build/msvc6/modules_mod_luamodule.dsp but I see that it does include the platform directory. /I "$(WXWIN)\lib\vc_dll\mswu" So... > the following warnings are issued > > luamodule.obj : warning LNK4217: locally defined symbol > ?SetEventHandler@wxLuaState@@QAEXPAVwxEvtHandler@@@Z (public: void __thiscall > wxLuaState::SetEventHandler(class wxEvtHandler *)) imported in > function _luaopen_wx luamodule.obj : warning LNK4217: locally defined symbol > ?Create@wxLuaState@@QAE_NPAUlua_State@@W4wxLuaState_Type@@@Z (public: bool > __thiscall wxLuaState::Create(struct lua_State *,enum wxLuaState_Type)) > imported in function _luaopen_wx > luamodule.obj : warning LNK4217: locally defined symbol ?Ok@wxLuaState@@QBE_NXZ > (public: bool __thiscall wxLuaState::Ok(void)const ) imported in function > _luaopen_wx > luamodule.obj : warning LNK4217: locally defined symbol ??0wxLuaState@@QAE@_N@Z > (public: __thiscall wxLuaState::wxLuaState(bool)) imported in function _$E1 > luamodule.obj : warning LNK4049: locally defined symbol ?wxEVT_LUA_ERROR@@3HB > (int const wxEVT_LUA_ERROR) imported > luamodule.obj : warning LNK4049: locally defined symbol ?wxEVT_LUA_PRINT@@3HB > (int const wxEVT_LUA_PRINT) imported > luamodule.obj : warning LNK4217: locally defined symbol ??1wxLuaState@@UAE@XZ > (public: virtual __thiscall wxLuaState::~wxLuaState(void)) imported in function > _$E2 > > This is rather odd importing local name ??? the warning does not specify which > one is used. I suspect the local one cannot be overridden. The importing error probably means that the functions/classes that are in the DLL that the luamodule wants to link to are not exported, meaning that they're local to the "other" DLL and inaccessible to the luamodule dll. All the libs we build have their own code like this in a header file names XXXdefs.h to try to make sure things are right... // These are our DLL macros (see the contrib libs like wxPlot) #ifdef WXMAKINGDLL_LUAMODULE #define WXDLLIMPEXP_LUAMODULE WXEXPORT #define WXDLLIMPEXP_DATA_LUAMODULE(type) WXEXPORT type #elif defined(WXUSINGDLL) #define WXDLLIMPEXP_LUAMODULE WXIMPORT #define WXDLLIMPEXP_DATA_LUAMODULE(type) WXIMPORT type #else // not making nor using DLL #define WXDLLIMPEXP_LUAMODULE #define WXDLLIMPEXP_DATA_LUAMODULE(type) type #endif ============== You get these problems when you've replaced /D "WXUSINGDLL" with /D "WXMAKINGDLL" in wxLua/modules/build/msvc6/modules_mod_luamodule.dsp Or alternatively, in your modules_mod_luamodule.vcprj the original project file had something like this PreprocessorDefinitions="_USRDLL;DLL_EXPORTS;WXUSINGDLL;_UNICODE;__WXMSW__;WXMAKINGDLL_LUAMODULE" and is now PreprocessorDefinitions="_USRDLL;DLL_EXPORTS;WXMAKINGDLL;_UNICODE;__WXMSW__;WXMAKINGDLL_LUAMODULE" Is this correct? I'm sorry I'm a little lost. If things have gotten changed too much, it might be hard to tell what really worked or what broke things, maybe it might be a good idea to start with a fresh copy of the sources and change one thing at a time. My experience with changing things with the GUI hasn't been good, I was never sure that it did what I wanted it to do. I hope we can get this sorted out. John Labenski |
From: Hakki D. <dog...@tr...> - 2007-06-26 22:33:43
|
Hi, John Labenski wrote: > On 6/26/07, Hakki Dogusan <dog...@tr...> wrote: >>> I think I found the reason of requiring szDomain parameter to translate.. >>> >>> [intl.h] >>> virtual const wxChar * >>> GetString(const wxChar *szOrigString, >>> const wxChar *szDomain = NULL) const; >>> >>> szDomain is declared as wxChar here, and: >>> >>> [intl.cpp ~2608] >>> it is checked against NULL > ... >>> but in [wxLua - datetime.cpp ~5733] it is declared and used as wxString: >>> //virtual wxString >>> //GetString(const wxString& szOrigString, >>> // const wxString& szDomain = "") const; >>> static int LUACALL wxLua_wxLocale_GetString(lua_State *L) >>> ... >>> const wxString szDomain = (argCount >= 3 ? >>> wxlState.GetwxStringType(3) : >>> wxString(wxEmptyString)); >>> ... >>> >>> If we omit szDomain parameter, it gets an emty string instead of NULL! > > But wxString(wxEmptyString).GetData(0) == 0 so it should look like a > NULL? Note that we use wxString(wxEmptyString) here for some compilers > to not complain about different data types. > >> I hacked datetime.cpp and wx_bind.cpp to test my thinking; now GetString >> and wxGetTranslation works as expected.. >> >> [datetime.cpp] >> >> static int LUACALL wxLua_wxLocale_GetString1(lua_State *L) >> ... > > What about just this? Remove the IsEmpty and NULL. Does it work just > using c_str()? > No, it didn't work. ( "" != NULL Isn't it?) > // returns = (self->GetString(szOrigString, szOrigString2, n, szDomain)); > returns = (self->GetString(szOrigString, szOrigString2, n, > szDomain.c_str())); > > If so, I have a workable fix for it. > John Labenski > BTW, I'm testing for gcc-3.4.5 now. Compiler dies at static struct definitions while compiling wx_bind.cpp. To see, I commented following, and it compiles: static wxLuaBindEvent eventList[] = { /* ... */ { 0, 0, 0 }, }; static wxLuaBindString stringList[] = { /* ... */ { 0, 0 }, }; I'm googling now... -- Regards, Hakki Dogusan |
From: John L. <jla...@gm...> - 2007-06-26 22:13:39
|
I committed a fix using "str:IsEmpty() ? NULL : str.c_str()", but I'd still like to know if we can just use "str.c_str()". Thanks, John Labenski On 6/26/07, John Labenski <jla...@gm...> wrote: > On 6/26/07, Hakki Dogusan <dog...@tr...> wrote: > > > > > > I think I found the reason of requiring szDomain parameter to translate.. > > > > > > [intl.h] > > > virtual const wxChar * > > > GetString(const wxChar *szOrigString, > > > const wxChar *szDomain = NULL) const; > > > > > > szDomain is declared as wxChar here, and: > > > > > > [intl.cpp ~2608] > > > it is checked against NULL > ... > > > but in [wxLua - datetime.cpp ~5733] it is declared and used as wxString: > > > //virtual wxString > > > //GetString(const wxString& szOrigString, > > > // const wxString& szDomain = "") const; > > > static int LUACALL wxLua_wxLocale_GetString(lua_State *L) > > > ... > > > const wxString szDomain = (argCount >= 3 ? > > > wxlState.GetwxStringType(3) : > > > wxString(wxEmptyString)); > > > ... > > > > > > If we omit szDomain parameter, it gets an emty string instead of NULL! > > But wxString(wxEmptyString).GetData(0) == 0 so it should look like a > NULL? Note that we use wxString(wxEmptyString) here for some compilers > to not complain about different data types. > > > I hacked datetime.cpp and wx_bind.cpp to test my thinking; now GetString > > and wxGetTranslation works as expected.. > > > > [datetime.cpp] > > > > static int LUACALL wxLua_wxLocale_GetString1(lua_State *L) > > ... > > What about just this? Remove the IsEmpty and NULL. Does it work just > using c_str()? > > // returns = (self->GetString(szOrigString, szOrigString2, n, szDomain)); > returns = (self->GetString(szOrigString, szOrigString2, n, > szDomain.c_str())); > > If so, I have a workable fix for it. > John Labenski > |
From: John L. <jla...@gm...> - 2007-06-26 22:03:01
|
On 6/26/07, Hakki Dogusan <dog...@tr...> wrote: > > > > I think I found the reason of requiring szDomain parameter to translate.. > > > > [intl.h] > > virtual const wxChar * > > GetString(const wxChar *szOrigString, > > const wxChar *szDomain = NULL) const; > > > > szDomain is declared as wxChar here, and: > > > > [intl.cpp ~2608] > > it is checked against NULL ... > > but in [wxLua - datetime.cpp ~5733] it is declared and used as wxString: > > //virtual wxString > > //GetString(const wxString& szOrigString, > > // const wxString& szDomain = "") const; > > static int LUACALL wxLua_wxLocale_GetString(lua_State *L) > > ... > > const wxString szDomain = (argCount >= 3 ? > > wxlState.GetwxStringType(3) : > > wxString(wxEmptyString)); > > ... > > > > If we omit szDomain parameter, it gets an emty string instead of NULL! But wxString(wxEmptyString).GetData(0) == 0 so it should look like a NULL? Note that we use wxString(wxEmptyString) here for some compilers to not complain about different data types. > I hacked datetime.cpp and wx_bind.cpp to test my thinking; now GetString > and wxGetTranslation works as expected.. > > [datetime.cpp] > > static int LUACALL wxLua_wxLocale_GetString1(lua_State *L) > ... What about just this? Remove the IsEmpty and NULL. Does it work just using c_str()? // returns = (self->GetString(szOrigString, szOrigString2, n, szDomain)); returns = (self->GetString(szOrigString, szOrigString2, n, szDomain.c_str())); If so, I have a workable fix for it. John Labenski |
From: Hakki D. <dog...@tr...> - 2007-06-26 21:15:15
|
Hi, [snip] >>> >>> loc = wx.wxLocale(wx.wxLANGUAGE_TURKISH) >>> >>> print(loc:GetString("&About")) --not translated >>> print(loc:GetString("&About", "wxstd")) --translated >>> >>> print(wx.wxGetTranslation("&About")) --not translated >>> print(wx.wxGetTranslation("&About", "wxstd")) --translated >>> > [snip] > > I think I found the reason of requiring szDomain parameter to translate.. > > [intl.h] > virtual const wxChar * > GetString(const wxChar *szOrigString, > const wxChar *szDomain = NULL) const; > > virtual const wxChar * > GetString(const wxChar *szOrigString, > const wxChar *szOrigString2, > size_t n, > const wxChar *szDomain = NULL) const; > > szDomain is declared as wxChar here, and: > > [intl.cpp ~2608] > it is checked against NULL > > > but in [wxLua - datetime.cpp ~5733] it is declared and used as wxString: > //virtual wxString > //GetString(const wxString& szOrigString, > // const wxString& szDomain = "") const; > static int LUACALL wxLua_wxLocale_GetString(lua_State *L) > ... > const wxString szDomain = (argCount >= 3 ? > wxlState.GetwxStringType(3) : > wxString(wxEmptyString)); > ... > > If we omit szDomain parameter, it gets an emty string instead of NULL! > I hacked datetime.cpp and wx_bind.cpp to test my thinking; now GetString and wxGetTranslation works as expected.. [datetime.cpp] static int LUACALL wxLua_wxLocale_GetString1(lua_State *L) ... // returns = (self->GetString(szOrigString, szOrigString2, n, szDomain)); returns = (self->GetString(szOrigString, szOrigString2, n, szDomain.IsEmpty() ? NULL : szDomain.c_str())); static int LUACALL wxLua_wxLocale_GetString(lua_State *L) ... // returns = (self->GetString(szOrigString, szDomain)); returns = (self->GetString(szOrigString, szDomain.IsEmpty() ? NULL : szDomain.c_str())); [wx_bind.cpp] static int LUACALL wxLua_function_wxGetTranslation(lua_State *L) ... // returns = (wxGetTranslation(sz, domain)); returns = (wxGetTranslation(sz, domain.IsEmpty() ? NULL : domain.c_str())); static int LUACALL wxLua_function_wxGetTranslationPlural(lua_State *L) ... // returns = (wxGetTranslation(sz1, sz2, n, domain)); returns = (wxGetTranslation(sz1, sz2, n, domain.IsEmpty() ? NULL : domain.c_str())); I hope you'll find a real solution... -- Regards, Hakki Dogusan |