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

[REBOL] Re: Natural selection

From: patrick:philipot:laposte at: 13-Jul-2003 17:37

Thanks Phil, I had mono-selection in mind... However based on your code, I managed to get mono-selection. It's pretty ugly too ;-)) mydata: ["Red" "Green" "blue"] view center-face layout [ mylist: list 200x100 [ across text 200 [ either mylist/picked = v-temp: to-integer rec-no/text [mylist/picked: 0] [mylist/picked: v-temp] either mylist/picked <> 0 [ face/color: brick ][ face/color: none ] show mylist ; print mold mylist/picked ] rec-no: text 1 ] with [picked: to-integer 0] supply [ face/text: either count > length? mydata [""][pick mydata count] rec-no/text: count either mylist/picked = count [ face/color: brick ][ face/color: none ] ] ] Regards Patrick ----- Original Message ----- From: <[philb--upnaway--com]> To: <[rebol-list--rebol--com]> Sent: Sunday, July 13, 2003 3:45 PM Subject: [REBOL] Natural selection
> Hi Partrick, > > This is not exactly compatible .... and pretty ugly. > > This program stores a record number with each line (beyond the end of the
list so we cant see it), and creates a picked block with the list. This picked block holds the count field rather than the picked text's.