From: GALLOWAY S. J (SVHM) <Stu...@sv...> - 2009-03-17 23:58:31
|
Hi As far as I know you can use flconvert for pyFTLK1 but I think FLTK2 doesnt work, at least not very well (?). Otherwise, you could hand translate it, but as you say that defeats the purpose. That being said - is there really a case to use pyFLTK if you want to keep using Fluid? Fluid is actually very nice and probably as good as any GUI builder you will get. The problems is writing the callbacks in C/C++. What about a one-off generic python interface or a few fairly simple interfaces that pass your call backs into python? You could store a value in user data that tells python what widget called the event (that way you do not have to interpret the identity of the widget pointer. You store event values in a global python structure that could be queried if required by your python routine. It sounds a bit slow but much of your time critical GUI work will be C/C++. I started doing such a thing which seemed to work OK - but in the end I decided to use wxPython (mainly because of the extra widgets). It just become all too much work. FLTK2 is lovely, particularly the browser in FLTK2, but last time I looked pyFLTK2 did not have enough working functionality to make it go. I have never been able to get SWIG actually working - maybe that is the reason I think it would be overkill. Aaron R> wrote: > I've used FLTK a fair amount in the past and usually set my projects > to use the following development process. > > - Design a form in fluid, then save the myform.fl file > - Implement the call back routines in a myFormCallbacks.cpp > - Set up my build system to: run fluid on the fl file, creating the > cxx, then compile the cpp and cxx into my app. > > Can someone give me advice on the proper development approach with pyFltk? > > 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. > > Thanks, > Aaron R> > > ------------------------------------------------------------------------ ------ > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are > powering Web 2.0 with engaging, cross-platform capabilities. Quickly and > easily build your RIAs with Flex Builder, the Eclipse(TM)based development > software that enables intelligent coding and step-through debugging. > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com > _______________________________________________ > Pyfltk-user mailing list > Pyf...@li... > https://lists.sourceforge.net/lists/listinfo/pyfltk-user > Disclaimer : The contents of this e-mail including any attachments are intended only for the person or entity to which this e-mail is addressed and may contain confidential, privileged and/or commercially sensitive material. If you are not, or believe you may not be, the intended recipient, please advise the sender immediately by return e-mail, delete this e-mail and destroy any copies. ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ |