On Jan 9, 2006, at 1:24 PM, Don Taylor wrote:

I have got the Designer up and running and I can layout a form and I like the way that sizers work. I was able to quicky layout a little app that took me most of an afternoon to layout in Boa Constructor. But I can't figure out how to write Python code.

As far as I can tell the Designer saves cdxml files which appear to contain a mixture of xml and Python - the Python code for any event routines that you code. I presume that the Dabo framework can be given cdxml files and it will fire them up showing the gui.

The code editor lets me write code for event methods and define my own methods, but I can only see one method at a time (shades of VB 4.0) at a time and I can't write Python classes or even import statements to get at code in other python modules.

I am obviously missing a key concept.

Probably the only one that you're missing is that the Designer is not the end of the line as far as Dabo visual tools are concerned. Future plans include a full IDE that will include project management, a regular editor for editing any file you like, database connection management, etc. What we've done is create the individual tools first, with the goal of eventually tying them all together. Right now we have the visual class designer, the connection editor, an editor for Python code, and a few other tools. While I'm cleaning up the last few bugs in the class designer, I'm sketching out ideas for the IDE, both on paper and in my head. I'm looking at several other IDEs out there to get a sort of "like/don't like" list, so that when the time comes to actually start coding it, I'll have a good idea of what I want it to look like and how I'd like it to work.

    To answer some of your specific questions:

I presume that the Dabo framework can be given cdxml files and it will fire them up showing the gui.

Yes, Dabo can create a live form from a .cdxml file. If you already have an app running, you can just call: dabo.ui.createForm("/ path/to/myfile.cdxml"), and that will create the form from the saved design. You can also set the .cdxml file as the MainFormClass of your app, and Dabo will correctly handle that. Or you can choose "Save Runnable App" from the menu, and that will create a small .py file that you can run to that will run your design for you.

The code editor lets me write code for event methods and define my own methods, but I can only see one method at a time (shades of VB 4.0) at a time

That's the way that the Designer works for now; when we integrate it into the IDE, that will probably change.

and I can't write Python classes or even import statements to get at code in other python modules.

To write Python classes, you probably want to run Editor.py, which gives you a full Python editor. There is a glitch that I have not been able to get an explanation from the Python powers-that-be as far as the placement of 'import' statements: if they are written *outside* of the method, they compile and run just fine, but when you use descriptors to run them from a class (as is done when you run a .cdxml file), they don't work, even though the compiled method is identical. So for now, add your import statments *inside* your method; e.g.:

def onHit(self, evt):
    import time
    self.Caption = time.ctime()

Hope that helps,

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com




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

Reply via email to