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

[REBOL] Re: How to refresh a text-list

From: reboler:programmer at: 27-Feb-2002 10:17

If I can make some assumptions here (always a dangerous thing), I think that 'fix-slider is directed toward showing slightly modified text-list/data, as in appending or deleting one value from /data. It changes what is shown in the text-list as little as possible. When you are completely changing the data (as in from one directory listing to another) then 'tell-list is the way to go, because it resets _everything_. Using 'fix-slider when the data is completely changed leads to many problems, but is good when the data is only slightly changed. Using 'tell-list when the data is only slightly changed may lead to unnecessary work. Here is a new function that addresses Phil's concerns, but I'll venture that it is still no good for his purposes because it resets the display to the top of the list. ;***** update-list: func [fce] [ ;you must change fce/data yourself! clear fce/picked fce/sld/data: 0 fce/sn: 0 fce/line-list: none fce/sld/redrag fce/lc / max 1 length? head fce/lines show fce ] view layout [ tl: text-list data read %./ button "Update" [;don't go beyond %/ !!! append clear tl/data read change-dir %../ ;here is where I change the tl/data ;remove find tl/data tl/picked ;alternative, must pick something in the list. update-list tl ] ] ;*****