Alex Tweedly wrote:
Using dabo.ui simply as a wx wrapper, it would be perfectly feasible to develop an arbitrarily complex app - but you'd have to give up all the simplicity and pleasure of using a GUI editor to create your UI controls and layout.

Indeed, this is what I do, and it does work well. However, I do long for the day to be able to visually lay out my designs. But it isn't a show-stopper for me as I've gotten quite good at visualizing what it will look like while writing the code. And most of the code writing starts with boilerplate to avoid typing the same patterns over and over again.

I was hoping to find an "in-between" solution that allowed the use if CD to keep the ability to use a GUI layout editor without having to wait until the IDE aspect was more complete. Or to put it another way - aiming to get 80% of the simplicity with only 20% of CD.

I think that is certainly possible. Write a tool to convert a cdxml class into a .py file (generated Python code). Say you had TestPanel.cdxml, the tool would create TestPanel_Layout.py with comments at the top warning you to not edit the file and to not save it to source control.

Then, create your own .py file that is going to use the file generated by CD converted to .py to write most of your code. You would then have code like:

import dabo
import TestPanel_Layout.py
class TestPanel(TestPanel_Layout.TestPanel_Layout):
        def afterInit(self):
                dabo.ui.info("hi")

And note that you could have indeed written your afterInit from within the CD, and in that case the afterInit in the manually-edited file would have overridden the code in the CD version, unless you called self.super(), which is all as you'd expect.

This could indeed give a "best of both worlds" temporary solution. And when the CD is finally done, it wouldn't be too difficult to merge all this custom app code back together again, if that is what is desired.

When you save the cdxml after modifying it, you'd have to also remember to run the cdxml->py script as well (or we'd just make that automatic from the CD and/or eventual project manager 'build' function).

Comments on this idea?

--
Paul McNett
http://paulmcnett.com
http://dabodev.com


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Reply via email to