Hi Henrik, > An alternative that might suit all kinds of application developers could > perhaps be a scaffolding script that generates the equivalent of choCuSu and > saves it. This basic stupid thing could then be edited by hand if the goal > is a traditional GUI or simply used as is if it is not. > > In fact the more I think about it the more I like the idea of a scaffolding > script, I think I'll go that way instead.
Well, this actually is the way I'm going, too. For standard data, I use a simple "master.l" file, which I use as a template, and edit it by hand by replacing all upper case tokens and adding fields. I attach it to this mail if anybody is interested. It allows me to create the GUI for a new master data class within minutes. The 'choCLS' function I usually move into a "gui.l" file in the app, if it needs to be accessed from other places. Cheers, - Alex
# 20jan09abu # (c) Software Lab. Alexander Burger (must "TITLE" PERM) (de choCLS (Dst) (diaform '(Dst) (<grid> "--." ,"Number" (gui 'nr '(+Focus +Var +NumField) '*CLSNr 10) (searchButton '(init> (: home query))) ,"Name" (gui 'nm '(+Var +TextField) '*CLSNm 30) (resetButton '(nr nm query)) ) (gui 'query '(+QueryChart) (cho) '(goal (quote @Nr (and *CLSNr (cons @ T)) @Nm *CLSNm (select (@@) ((nr +CLS @Nr) (nm +CLS @Nm)) (range @Nr @@ nr) (tolr @Nm @@ nm) ) ) ) 3 '((This) (list This (: nr) This)) ) (<table> 'chart (choTtl ,"ENTITIES" 'nr '+CLS) '((btn) (align "#") (NIL ,"Name")) (do (cho) (<row> (alternating) (gui 1 '(+DstButton) Dst) (gui 2 '(+NumField)) (gui 3 '(+ObjView +TextField) '(: nm)) ) ) ) (<spread> (scroll (cho)) (newButton T Dst '(+CLS) '(nr genKey 'nr '+CLS) 'nm *CLSNm ) (cancelButton) ) ) ) (menu ,"TITLE" (ifn *ID (prog (<h3> NIL ,"Select" " " ,"ENTITY") (form 'dialog (choDlg NIL ,"ENTITIES" '(nm +CLS))) ) (<h3> NIL ,"TITLE") (form NIL (<h2> NIL (<id> (: nm))) (panel T (pack ,"ENTITY" " '@1'") '(may Delete) '(choDlg NIL ,"ENTITIES" '(nm +CLS)) 'nm '+CLS) (<grid> 2 ,"Name" (gui '(+E/R +Cue +TextField) '(nm : home obj) ,"ENTITY" 40) ,"XXXX" (gui '(+E/R +NumField) '(xx : home obj) 40) ) (<spread> NIL (editButton T)) ) ) ) # vi:et:ts=3:sw=3