Rebol Talk Forum  |  REBOL Discussions  |  REBOL View  |  Topic: 'choice' and 'rotary' widgets in a layout
Pages: [1] Print
Author Topic: 'choice' and 'rotary' widgets in a layout  (Read 621 times)
jfdutcher
Jr. Member
**
Offline Offline

Posts: 95


View Profile
'choice' and 'rotary' widgets in a layout
« on: March 07, 2007, 08:38:18 PM »

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
Newbie
*
Offline Offline

Posts: 36


View Profile
Re: 'choice' and 'rotary' widgets in a layout
« Reply #1 on: March 08, 2007, 03:12:05 AM »

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.
Code:
view layout [
    choice [print "a" "b" "c"]
    choice data [print "a" "b" "c"]
]
Logged
Pages: [1] Print 
Rebol Talk Forum  |  REBOL Discussions  |  REBOL View  |  Topic: 'choice' and 'rotary' widgets in a layout
Jump to:  

  
Quick Search...

Advanced search
  
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 02, 2008, 07:37:37 AM
Username: Password: Session Length:
  

News: 01-09-08

Alpha version of REBOL 3 has been released!


  
2311 Posts in 595 Topics by 4141 Members
Latest Member: wintervssummer

  Rebol Talk Forum | Powered by SMF 1.0.9.
© 2001-2005, Lewis Media. All Rights Reserved.

RT design by Defiant Pc