|
Pages: [1]
|
 |
|
Author
|
Topic: 'choice' and 'rotary' widgets in a layout (Read 621 times)
|
|
jfdutcher
|
Does anyone know why the only widget that will successfully 'populate' itself using the block noted (utildb/2/3 and utildb/2/5) in this little script is the 'text-list' shown ?? A 'choice' or a 'rotary' would probably make a better interface item but neither will successfully populate inside this 'view layout'.....even the 'sample' choice from the VIEW guide won't run here, even though it does in the console.
Rebol[Title: "displayResident.r"] resident: system/script/args vetsdb: load %/c/vetssrc/dietsys/rebdsysmst.txt resdb: find vetsdb resident utildb: find vetsdb "0000"
view layout [ backcolor silver h1 "Dietsys for the New York State Vets' Home" h2 "View and/or Change any Resident values - Press APPLY to make changes permanent" across style labels label maroon font-size 14 text "Registration #: " text resident text "Last Name: " field resdb/2/2 text "First Name: " field resdb/2/3 text "MInit: " field 20 resdb/2/4 return ;choice "A" "B" "C" ;func[face text] [print face/text] ;choice utildb/2/3 func[face text] [print face/text] ;choice utildb/2/5 func[face text] [print face/text] across ;text "Doctor Assigned: " rotary utildb/2/3 ;text "Responsible FNS: " rotary utildb/2/5 across text "Doctor Assigned: " text-list data utildb/2/3 text "Responsible FNS: " text-list data utildb/2/5 return button 150x50 "Submit Request" ]
|
|
|
|
|
Logged
|
|
|
|
|
DideC
|
The question is : what is the datatype of utildb/2/3 or utildb/2/5 ? If its block! (as I expect it to be), then VID think it's the action block, not the data block of the 'choice. To specify the data block (texts of the 'choice) you must use the 'data word before the block. view layout [ choice [print "a" "b" "c"] choice data [print "a" "b" "c"] ]
|
|
|
|
|
Logged
|
|
|
|
|
|
Pages: [1]
|
|
|
 |