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

how to refresh fields in a VID list?

 [1/6] from: anton::globalcenter::net::au at: 17-Sep-2000 22:57


Hi, This is a cut-down of the code: block: copy [ ["ssql" "www.somewhere.com" "a-o.dll-eUK-osform_template=awake.t" 388 ] ["ping" "203.89.213.43" "" "5"] ] view layout [ button "refresh" [{Here, contents of block changes - how should I refresh list? }] mylist: list 850x400 80.80.80 [across field field field field] data block ] Anyone can help? Regards, Anton.

 [2/6] from: carl:cybercraft at: 19-Sep-2000 9:37


On 18-Sep-00, [anton--globalcenter--net--au] wrote:
> Hi, > This is a cut-down of the code:
<<quoted lines omitted: 12>>
> Regards, > Anton.
I asked much the same question a while back - which received no response. (: Hope you have better luck, or that the promised new View/VID docs appear soon and help to explain such things a little better.

 [3/6] from: allen:rebolforces at: 20-Sep-2000 15:39


Hi Anton, Seeing no one has answered this yet. Here is how you can do it. I've added a few buttons to help demonstrate it too. To make it work you need to provide your own handler for the row in the list by using 'supply
>From within block that you provide for 'supply, you have access to the word
'count, this is the index of the row you that you supplying data for. Count is in incremented from 1 to the max number of rows showing in the list. The faq.r script in the View Test Panel, is a good example to study for other things that can be done with List. Cheers, Allen K p.s This example does not show how to edit directly in the list, there are some issues with doing that, at this stage I would suggest just using lists to display data. Here is a reworking of your example REBOL [] block: copy [ ["ssql" "www.somewhere.com" "a-o.dll-eUK-osform_template=awake.t" "388"] ["ping" "203.89.213.43" "" "5"] ] view layout [ across button "Add Stuff" [append/only block reduce ["Random Data" random 255.255.255.255 "--" random 2000] show mylist] button "Remove Top" [remove block show mylist] button "Sort" [sort block show mylist] return mylist: list 850x400 80.80.80 [across f1: field f2: field f3: field f4: field] data block supply [ ; print count ;--for debugging either none? row: pick head block count [ f1/text: none f2/text: none f3/text: none f4/text: none f1/text: pick row 1 f2/text: pick row 2 f3/text: pick row 3 f4/text: pick row 4 ] ] ] . ;-----------

 [4/6] from: allen:rebolforces at: 20-Sep-2000 15:48


For some strange reason the demo code had stripped a couple of ][ when I cut a pasted. Try again. Cheers Allen K REBOL [] block: copy [ ["ssql" "www.somewhere.com" "a-o.dll-eUK-osform_template=awake.t" "388"] ["ping" "203.89.213.43" "" "5"] ] view layout [ across button "Add Stuff" [append/only block reduce ["Random Data" random 255.255.255.255 "--" random 2000] show mylist] button "Remove Top" [remove block show mylist] button "Sort" [sort block show mylist] return mylist: list 850x400 80.80.80 [across f1: field f2: field f3: field f4: field] data block supply [ ;print count ;--for debugging either none? row: pick head block count [ f1/text: none f2/text: none f3/text: none f4/text: none ][ ; <-- this disapeared in the last post f1/text: pick row 1 f2/text: pick row 2 f3/text: pick row 3 f4/text: pick row 4 ] ] ]

 [5/6] from: carl:cybercraft at: 20-Sep-2000 22:59


On 20-Sep-00, [allen--rebolforces--com] wrote:
> Hi Anton, > Seeing no one has answered this yet. Here is how you can do it. I've > added a few buttons to help demonstrate it too. > To make it work you need to provide your own handler for the row in > the list by using 'supply
[snip] Ahah! 'supply is what my list attemps had been missing... Not Anton - but thanks anyway Allen. (;

 [6/6] from: anton:globalcenter:au at: 21-Sep-2000 1:52


Allen, I just got back to work and had a look at your code. Great! Just what I needed. :) Thanks. I was assuming that 'show mylist was all that I would need, after referring the list to block. I see that the list does not link all its fields back to the block, but copies the block contents into the fields on initialising. Anton. [allen--rebolforces--com] wrote:

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