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

[REBOL] Re: How to show text-list selection?

From: raimund:swol at: 18-Nov-2000 23:42

Am Sam, 18 Nov 2000 schrieben Sie: Hi, thanks for the answer. The method 2 nearly worked for me, I settled with the following solution: data-block: ["Wilhelm" "Helge" "Werner" "Fritz"] selection: make block! 100 view layout [ text-list data data-block [ change head tl2/data pick data-block index? find data-block value show tl2 ] tl2: text-list selection ] Interesting is the line with the change. Append does work too, but the list gets always longer. Raimund
> Hi Raimond, > > Here are two ways of doing it. I've used append to better illustrate that > the updated contents of tl2 are being shown. > > ;Method1: Using tl2/data, this is were the contents of the text-list are > stored > > data-block: ["Wilhelm" "Helge" "Werner" "Fritz"] > > view layout > > text-list data data-block [ > append tl2/data value > show tl2 > ] > tl2: text-list > ] > > ;Method2: > ;if there already something in the 'selection block you could do it this way > ;(otherwise you will get an error). > > data-block: ["Wilhelm" "Helge" "Werner" "Fritz"] > selection: ["Line1"] > > view layout > > text-list data data-block [ > append selection value > show tl2 > ] > tl2: text-list data selection > ] > > Cheers, > > Allen K > > ----- Original Message ----- > From: "Raimund Dold" <[raimund--swol--de]> > To: "Rebol" <[rebol-list--rebol--com]> > Sent: Saturday, November 18, 2000 9:09 PM > Subject: [REBOL] How to show text-list selection? > > > > > Hi! > > > > I am playing around with rebol view and did not found an answer to the > > following question: How can I redisplay an element with updated contents? > The > > following examples illustrates what I am trying to do: > > > > ------------------------------ example ------------- > > REBOL [ > > Title: "Simple List View" > > File: %list-view.r > > Date: 18-Nov-2000 > > Author: "Raimund Dold" > > Purpose: {Example of a simple list viw.} > > ] > > > > > > data-block: ["Wilhelm" "Helge" "Werner" "Fritz"] > > selection: make block! 100 > > > > view layout > > > text-list data data-block [ > > selection: pick data-block index? find data-block value > > show tl2 > > ] > > tl2: text-list selection > > ] > > > > print selection > > ------------------------------ example ------------- > > > > I can print the selection afterwards but the show tl2 seems not to have an > > effect?? > > > > Thanx > > > > Raimund > > > > -- > > <---------------------------------------------> > > 42 war schon immer einge gute Antwort;-)) > > -- > > To unsubscribe from this list, please send an email to > > [rebol-request--rebol--com] with "unsubscribe" in the > > subject, without the quotes. > > > > > > -- > To unsubscribe from this list, please send an email to > [rebol-request--rebol--com] with "unsubscribe" in the > subject, without the quotes.
-- <---------------------------------------------> 42 war schon immer einge gute Antwort;-))