[REBOL] Re: RFC: Forms generator / RAD dialect
From: atruter:hih:au at: 21-Aug-2002 10:08
But I hate repetitive tasks, especially creating very
basic GUI forms. So why not use Rebol for this?
Thing like this shouldn't be written by hand:
lab "Company" company: fld return
I agree, but isn't the answer just to make better use of styles. eg.
to-width: func [x] [
75 + 8 * x - 8
; VID types
lbl: lbl blue to-width 1
field: field to-width 1
date-field: field [
if not empty? face/text [
either none? attempt [to-date face/text] [
face/text: form to-date face/text
; Derived types
lab-address: lbl "Address:"
fld-address: field to-width 3
lab-date: lbl "Date:"
lab-code: lbl "Code:"
view layout [
across lab-address fld-address
return lab-date fld-date
Defining things in this manner means we can easily make global changes to
both VID types and our derived types. I believe this approach is more
efficient than trying to create a dialect that is used to essentially
achieve the same result, but feel free to point out the flaws in my logic /