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

[REBOL] Re: Newbie Q: Modifying Text-List

From: gscottjones::mchsi::com at: 20-Oct-2002 14:14

From: "Bruno Lemeri"
> I try to add items to a list bbl and the associated text-list: > > bbl: [ "a" "b" "c" ] > > view layout [ > button "Add" bold > [ repend bbl copy t1/text > bbl: sort unique bbl > show cl > ] > t1: area 340x280 > cl: text-list data bbl > ] > > the text list is not updated after the second added item. > this script works fine without "bbl: sort unique bbl". > Anyone could give me a hint ? > (I found no response in Brett Vid/view notes)
Hi, Bruno, unique returns a new block that you have reassigned to bbl. cl/lines needs to be repointed to this new block. (I don't know why it works the first time only, though.) Hopefully this code works: bbl: [ "a" "b" "c" ] view layout [ button "Add" bold [ repend bbl copy t1/text bbl: sort unique bbl cl/lines: :bbl show cl ] t1: area 340x280 cl: text-list data bbl ] (Note well: this will change with the next /View/VID, where the /data path will contain the block used by the text-list.) HTH --Scott Jones