On 1/15/07, Hakki Dogusan <[EMAIL PROTECTED]> wrote: > >Klaas Holwerda wrote: > >> > >> Being finished my first "toy" project with wxLua, > >> I'm now considering to use it in a real project. > >> > >> As subject says, I need your thoughts. > >> > >> I'm planning to write my 15 years old program from > >> stratch. I was thinking to write it in C++. > > > > But > >> my little experiment shows that (to me at least), > >> wxLua may be a good chooice :) > > > > I think lua is prefect for scripts and small programs. > > Lua is ideal to extend application with scripting. > > So i say write your app in C++ using wxWidgets and all the OOP things to > > make your application well organized, and > > document it with doxygen, and next extend it with wxLua. > > Writing application of 80000 lines in wxLua is not so good i think. > > At least in wxArt2D this is how i do it. > > A simple form of such an application is already in wxLua/apps/wxluacan. > > Vote: -1 from you :) ... > > http://www.dynaset.org/index.php?page=kullanim_ornekleri >
Looking at the screen captures on your website I think wxLua could handle all of that. Klaas is probably right that 80000 lines in lua might be a little much. You'd have to be very structured and probably implement some type checking using lua's assert. You'd miss out on the compile-time checks which can catch a lot of bugs though. You might want to try out one of the OO libraries for lua. On the other hand, if your 80000 lines are in C, the hashtables and garbage collection lua would get rid of all of the memory management code and some of the nice little "tricks" you can use in lua with the tables make for very tight and readable code. I think that wxLua would be good for managing all of the structures it looks like you use. You'd probably want to use a dialog designer program for much of the GUI, XML should work. You might want to create a C++ module for the graphics if you're worried about the speed. You can use your own custom wxEvent class to send notifications to wxLua for major events while the C++ code does all the processor intensive mouse moving logic. It's incredibly easy to wrap C++ into wxLua using your own headers. Just take the C++ headers, clean them up and turn them into a *.i interface file(s), copy and edit one of the *_rules.lua files and run genwxbind.lua on it. Once you have the C++ files, just add them to your project and make sure you call the *_init function to install them at startup. The biggest plus for wxLua is that there's no compile time. The main headache I have with C++ wxWidgets is that if you run into little problems with sizing or things that need tweaks or misunderstood flags, having to recompile for each test is a huge time sink. ----- It might be good to feel things out in wxLua, start small with broad strokes and tackle the bits that seem like they might be cause the most trouble. Since lua translates into C fairly easily (except for the tables), if things don't work in wxLua (please tell us why) and you move to C++ you can reuse much of the code. Regards, John Labenski ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ wxlua-users mailing list wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users