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

How to show text-list selection?

 [1/4] 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
<<quoted lines omitted: 80>>
> [rebol-request--rebol--com] with "unsubscribe" in the > subject, without the quotes.
-- <---------------------------------------------> 42 war schon immer einge gute Antwort;-))

 [2/4] from: raimund::swol::de at: 18-Nov-2000 12:09


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;-))

 [3/4] from: allenk:powerup:au at: 18-Nov-2000 23:03


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

 [4/4] from: petr:krenzelok:trz:cz at: 18-Nov-2000 15:39


Ah, I had similar problem with dynamically generated list consisting of two columns, where performing action upon item from first column (text based) should updata led in the second column. I printed easily changed state to the console, but was not able to get update in the view by using 'show .... found no solution around, so my script lays postponed .... -pekr-

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted