On Friday 01 February 2008 5:42 am, Ed Leafe wrote: > On Jan 31, 2008, at 9:24 PM, Adrian Klaver wrote: > > What prompted this is my attempts to enter Key values directly into > > the cdxml > > file. > > Do you mean property values for objects? They aren't that much > different than in Python code: > > dLabel(frm, Caption="Foo") > > <dLabel Caption="Foo">
A couple of points: Changes made to a cdxml file outside of the ClassDesigner seem to get overwritten. Getting the coding/escaping right for XML is finicky and error prone. > > > Lets just say it reconfirmed my allergy to XML. > > I can't help you there. XML is unparalleled as a data storage format. See below. > > > I thought how much easier it would be to edit Python code. > > Don't take this the wrong way, but you should be writing Python code > instead of using the Class Designer if your goal is to have Python > code to edit. I am progressing to that point, but in the absence of documentation of how the various parts of Dabo work together the ClassDesigner is the best tool to learn Dabo. > > > Just for my reference why is XML necessary? > > It is a standard format for data storage in plain text. We could have > gone with SQLite tables, in a manner similar to certain other > products, but a) the result would be even less editable, and b) it > adds an unnecessary translation layer. > > > I mean you can write an application in Python and have Dabo render > > it, so what is the purpose of the XML? > > Because nothing is as flexible and powerful. XML rocks, unless you > have some odd allergy to it. I realize I am fighting an uphill battle in regards to XML, one I waging on multiple fronts. I for one think it sucks as a data storage tool. For similar purposes I find YAML(http://pyyaml.org/) to be much easier to work with and understand. Just my 2 cents. > > If it really is so terrible to you and yet you still want to use the > visual tools, why not write a program that takes any Dabo script and > re-creates it in the Class Designer? It surely must be a simple matter > to do so; I just don't seem to understand Python well enough to figure > that one out. Nor I at this point. Its a chicken and egg problem. > > Really, though: just stick to writing everything in code. Visual > tools are not for you. My goal at some point in the near future. The issue such as it is, is that the entry point for people new to Dabo will be ClassDesigner and they will start looking at the cdxml files to see how things are done. Seeing Python code would be more helpful in seeing how things work. At some point the XML in the cdxml is converted back to Python to generate a form. If there was way to dump that information (however inelegant) back to a file it would be very helpful. > > -- Ed Leafe > -- Adrian Klaver [EMAIL PROTECTED] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]
