|
From: LukenShiro <luk...@ng...> - 2009-03-17 21:54:03
|
lunedì 16 marzo 2009, Aaron R> ha scritto: > Do I build a form with fluid, generate my cxx, and run swig on it to > get access to the form in python? I want to keep my gui layout and > presentation isolated from my control and logic code. I could build > the forms in pure python, but that defeats the use of the fluid > layout editor. I don't know if I can help, but you can use "flconvert" to convert fluid .fl files directly into .py files (you don't need .cxx ones, nor swig). AFAIR if you insert all necessary data in fluid layout .fl file, you can reasonably avoid new generated .py file's next adaptation. You can use flconvert from source packages (with global variables) or from svn (more object-oriented). In order to separate underlying business logic from controller and from view, I believe the best method is to apply MVP (model-view-controller) or one of its derivative patterns: roughly you could have inter- dependent 3 units (classes or files or groups of files): the first only for model, the second for graphic presentation (using data from model) and the last for controlling events (e.g. using callbacks from view). But I'm not really an expert in this pattern ... -- GNU/Linux * Slackware 'current' GNU/Linux * Bluewhite64 'current' LU #210970 LM #98222 SU #12583 |