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

[REBOL] Re: Text-List more help please

From: gjones05:mail:orion at: 28-May-2001 17:33

From: "Ammon Cooke"
> I need to be able to randomly select an item from the list if it is > accessable like an index in a Perl array: > > #array[0] > #array[1] > #array[2] > #array[3] > > with each [number] being a different item. > > Thanks Again!! > Ammon
The following will pick an item at random each time it is evaluated: random/only ["apples" "oranges" "bananas" "pears" "kiwi"] So: view layout [ tl1: text-list data ["apples" "oranges" "bananas" "pears" "kiwi"] txt "Select items randomly with a click" button "Select" [t1/text: random/only tl1/data show t1] t1: txt 80 0.0.255 255.255.255 ] --Scott Jones