Lino Website

code changes

Merge gendoc and forms? (26.05.06)

Saturday, 27. May 2006 17:11.

No, I won't merge the two modules. But I understood their similarities and made first changes.

They are similar in that they provide a kind of markup concept so that the user code who defines a layout does not know how it will be implemented.

The difference is that gendoc is used for static (non-interactive) documents (plain text, PDF, HTML, OpenOffice,...) while forms is for the interactive «documents» of a GUI (called «forms», «dialogs» ot «windows») .

The reason why I wanted to merge them was the observation that a HTML document can contain entry fields and other interactive widgets. But while the observation is true, it is wrong to mix up gendoc and forms. If I want static formatted text in a Form, then I'll either add a new type "formatted label", or extend the existing label.

Comparison table

Name lino.forms lino.gendoc
result Form Document
widget class Component Element
main widget Panel Story

user methods label(), button(), datagrid() par(), memo(), ul(), report()

But I liked the new syntax for Form.layout() and implemented it almost as described. Only that the parameter passed to Form.layout() is not a Document but a Panel. The main component of a Form is always a Panel.

Copyright 2001-2007 Luc Saffre.
Generated 2007-06-07 16:22:44