Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: chance the (dynamic) data

From: th72::dds::nl at: 5-Sep-2005 12:44

It's more difficult then I thought. The next problem is that I want to use this in a iterrated list. For every row in the list it has to be possible to chance the choice-buttons independent of each other, the data is comming from a database-block. I think I'am missing some copy statement somewhere. I tried several options but nothing is working. The choice-buttons get changed but they are not working independent, only the first one. So there is some problem with sharing.... Thanks for any help. rebol [] db: [ ["1" "question 1 " ["true" "false"]] ["2" "question 2" ["true" "false"]] ["3" "question 3" ["true" "false"]] ] offset: 0 db-size: does [length? db] out: layout [ text "list example" across mylist: list 640x480 [across t1: text 50 t2: text 200x40 para [wrap?: true] c1: choice "1" "2" ] supply [ supply-data face count index ] sld: scroller 10x480 [offset: to-integer sld/data * db-size show mylist] ] supply-data: func [face count index /local temp] [ temp: count + offset either temp <= db-size [ switch index [ 1 [face/text: do to-path compose [db (temp) 1]] 2 [face/text: do to-path compose [db (temp) 2]] 3 [face/texts: do to-path compose [db (temp) 3] face/text: do to-path compose [db (temp) 3 1]] ;3 [face/texts: copy ["ja" "nee"] face/text: copy "ja" ] ] ] [face/text: none] ] view out rebol [] db: [ ["1" "question 1 " ["true" "false"]] ["2" "question 2" ["true" "false"]] ["3" "question 3" ["true" "false"]] ] offset: 0 db-size: does [length? db] out: layout [ text "list example" across mylist: list 640x480 [across t1: text 50 t2: text 200x40 para [wrap?: true] c1: choice "1" "2" ] supply [ supply-data face count index ] sld: scroller 10x480 [offset: to-integer sld/data * db-size show mylist] ] supply-data: func [face count index /local temp] [ temp: count + offset either temp <= db-size [ switch index [ 1 [face/text: do to-path compose [db (temp) 1]] 2 [face/text: do to-path compose [db (temp) 2]] 3 [face/texts: do to-path compose [db (temp) 3] face/text: do to-path compose [db (temp) 3 1]] ;3 [face/texts: copy ["ja" "nee"] face/text: copy "ja" ] ] ] [face/text: none] ] view out Graham Chiu wrote: