From: John L. <jla...@gm...> - 2005-08-01 18:47:25
|
On 8/1/05, k. holwerda <kla...@nl...> wrote: > I want to get rid of the errors, caused by WXWIN_COMPATIBILITY_2_4 =3D 0. >=20 > So i first tried to find wxchkver25, it is not defined in any header. > Should the user set/define it himself? It is used in wxbind.h and all > the generated *.cpp files. This is used only by the wrapper generator, they're comments in the generated cpp files to tell you what the source was from. > In genwxbind.lua i find: > conditions["%wxchkver25"] =3D "wxCHECK_VERSION(2,5,0)" >=20 > But it seems this does not become a setting in a header file? The %wxchkver25 is replaced by wxCHECK_VERSION(2,5,0), see for example in the generated wrappers in this file "modules/wxbind/src/windows.cpp" #if wxCHECK_VERSION(2,5,0) // %wxchkver25 void ClearBackground() static int LUACALL wxWindow_ClearBackground(lua_State *L) .... #endif > Same for the next conditions["%wxcompat24"] =3D "WXWIN_COMPATIBILITY_2_4" > For the moment i just set it to 1 or 0 myself, but what am i missing? This is done for you by the c++ compiler, again see the generated wrappers, they're may be bugs however, I've never tested turning COMPAT_2_4 off. I don't know if it's worth it to fix them all if we're getting new wrappers anyway since it'll be hard to compare the two and you'll have to check everything all over again. =20 > Is the next the right way of disabling a member when > WXWIN_COMPATIBILITY_2_4 is set 0? >=20 > %wxcompat24 void SetPrinterOptions(const wxString& options) > %property=3DPrinterOptions, read, write I think it should be this, only include this if the wxWidgets version is < 2.5 or if WXWIN_COMPATIBILITY_2_4 is on. !%wxchkver25|%wxcompat24 void SetPrinterOptions(const wxString& options) > What about that property? Put the same checks for the property since it's basicly the same thing. Some of the checks are really ugly, we should write a parser for=20 %wxchkver(2,5,0) so that it can be translated to wxCHECK_VERSION(2,5,0) directly without having to mess with all the %wxchverXX translations in wxluawrap.lua. Again, this is a trivial thing, but time consuming and a big change like this would make it very difficult to merge back in with Rays new wrappers so I was going to do it afterwards if people liked it. Regards, John Labenski |