Paul McNett wrote:
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")
This looks quite similar to what Eli Golovinsky did with pywxrc for
XRCed (it's in the CVS head revision). You create/edit an XRC file with
XRCed and ask it to write out the .py file. Then you import the file,
which contains a class definition, and subclass it. The generated class
has to code to load the XRC resource and create ivars for the named
controls. I haven't used it (yet), but it looks like a nice way to go.
--
Don Dwiggins
Advanced Publishing Technology
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users