From: Francesco M. <f18...@ya...> - 2006-02-04 12:26:44
|
Hi, klaas.holwerda ha scritto: > John Labenski wrote: > >> Any problems with getting rid of >> the wxModule way and adding the C functions to put this initialization >> problem behind us? >> >> > I think yes, since i think the order of bindings also mattered somehow. > I like the module aproach since it make ist possible to control the > order of binding. > My problems started with that remember? First soemthing of the base > libraries needs to happen before > calling bindings. > > I currently add this in the top of my main file. > > wxart2d_Binding dummy; > > We could make this a macro, something like USE_MODULE( wxart2d ). > This does not have the problem of needed the functions. > > In principle any simple structure can be used ( one int ), as long as it > comes from that library. This looks like a good approach to me: it doesn't require to throw away the wxModule(s) currently present and can be easily encapsulated in a black-box macro like USE_MODULE :) There is only a drawback: the 'dummy' var is in this case a wxart2d_Binding, but if I understood, one would also need to create a wxlua_Binding and wxluastc_Binding (or equivalent). How big are those classes ? If they take much memory it could be a problem... including just a simple structure (like a simple INT variable declared in the wxbind.lib and wxbindstc.lib libraries) could not work with all compilers: some of them could 'see' that you are using just that INT and keep it while still throwing away all the rest of the code. Sorry for my poor advices in this area but I still need to understand exactly how wxLua works :) Francesco |