[REBOL] Re: Viewing two or more copies of the same layout
From: g:santilli:tiscalinet:it at: 10-Feb-2004 11:17
Hi Robbie,
On Tuesday, February 10, 2004, 4:59:49 AM, you wrote:
RA> patient-record: context [
RA> id: none
RA> f1: none
RA> lyt: layout [
RA> across
RA> text "Name"
RA> f1: field
RA> return
RA> btn-enter "Save" [; save record to database for this id]
RA> ]
RA> populate: func [i [integer!]] [
RA> ; set f1/text = to name from database where id = i
RA> ]
RA> ]
An alternative to Brett's would be to use:
patient-record: context [
id: none
f1: none
f1-value: ""
lyt: [
across
text "Name"
f1: field f1-value
return
btn-enter "Save" [; save record to database for this id]
]
populate: func [i [integer!]] [
; set f1-value = to name from database where id = i
]
]
p: make patient-record [populate 1]
view/new layout p/lyt
p: make patient-record [populate 2]
view/new layout p/lyt
Regards,
Gabriele.
--
Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer
Amiga Group Italia sez. L'Aquila --- SOON: http://www.rebol.it/