An attempt to use a python-based mini declarative language for formdefinition

WenChen w.hol at auckland.ac.nz
Wed Sep 22 22:18:25 EDT 2004


Hi

I have done scripts to generate web form and the rest xml, content
template at once

here is the url 
http://newped.auckland.ac.nz/python/idevice_template

Currently, the save function only generate files in a template directory

That editor's goal is to allow none techie people to generate their
instructional devices( form ) on their own will and can be plugged into
eXe for use without further coding needs.

Don't know is this somewhat similar to what you want
the code itself is nothing special, it uses javascript dom and python
text processing. 

**************************************************************************
Later, we will put a help box & extra info ( for advanced user to put
style, tags info) for a field, 

This is a tool we will use in an opensource project
https://eduforge.org/projects/exe/

still at pre-planning stage, but there is a proof-of-concept to play
around -- see the idevices list, those can be generated by the idevice
editor
http://newped.auckland.ac.nz/python/eXe/start.pyg

**************************************************************************




> >>There should be some way to pass the "location". If you solve this, 
> >>you got your answer (of course, passing the "location" is not trivial,
> >> that's why every GUI toolkit has it own approach).
> > 
> > 
> > That's *exaclty* the root of my problems. I don't want to specify
> > positioning; I only want to use *relative positioning* for everything,
> > working as automatically as possible. Will it work for all situations?
> > I'm not sure. But I think it's worth investigating.
> > 
> > What I intend to do is to borrow some of the layout techniques defined
> > by CSS+DHTML. It is *much* more complex that this, but it basically
> > works by formatting "block level" and "inline elements" elements
> > relatively to each other. You can give hints as to the relative
> > positioning -- absolute, relative, floating to the left, floating to
> > the right, and stuff like that. The layout engine positions everything
> > according to the constraints. If the engine doesn't support advanced
> > layout, it simply falls back to a simple sequence of entries according
> > to the original text flow.
> > 
> > There are two reasons behnd my choice:
> > 
> > -- there is a lot of knowledge today about how to make good interfaces
> > using CSS. It's faster to develop and is more flexible regarding
> > different engines and platforms than to rely on absolute positioning
> > (as conventional GUI builders do)
> > 
> > -- it makes *much* easier to use the same form definition on native
> > GUIs and web-based ones. My goal is to be able to build a wxPython
> > dialog or a web form from the same description.
> > 
> > That's why I can't give positioning hints, at least for now. But I
> > could include relative ordering information; for example, an arbitrary
> > tag number. But doing this I would defeat my objective of clarity of
> > design.
> > 
> 




More information about the Python-list mailing list