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

Textlist items selection

 [1/5] from: fsievert::uos::de at: 11-Sep-2001 14:08


This one is a hack: data: ["888" "2001" "888" "2001" "888" "2001"] use [t] [t: 0 foreach dat data [repend dat ["^/" t: t + 1]]] view layout [ text-list as-is data (data) [face/picked: reduce [value]] ] ... but it works. CU, Frank On Tue, 11 Sep 2001, Cassani Mario wrote:

 [2/5] from: deadzaphod:flyingparty at: 11-Sep-2001 4:59


Well, this won't solve everything, but here's a function I wrote a week or so ago to deal with this problem. The first function changes a block so that all values are recognized as differnent by text-list, the second gives the index in the list of a value, so if you need it you can look up the original version of the strings (without the whitespace added to the end). ; for use with VID text-list data make-unique-list: func [ "Makes duplicate values discernable in a list of strings" list /local n out ] [ out: make block! length? list repeat n length? list [ either find skip list n pick list n [ insert tail out (head insert/dup tail (trim/tail copy pick list n) n) ][ insert tail out copy pick list n ] ] out ] index-of-value: func [ unique-list value ] [ index? any [ find unique-list value return none ] ]

 [3/5] from: mario:cassani:icl at: 11-Sep-2001 12:51


Hi all, please try the following: 8<---------------------------------------------------------- view layout [ size 250x340 text-list 200x314 "888" "2001" "888" "2001" "888" "2001" ] 8<---------------------------------------------------------- How can I make the above allow me to select one item only? The values are read from a file and can be duplicated (I must leave the duplicates and their position intact). Maybe something different from a 'text-list may help? Xie xie nimen Mario ============================================================ Mario Cassani PGP Key fingerprint: 9929 74CF 62E9 A7A4 60D6 05DC 8034 F354

 [4/5] from: g:santilli:tiscalinet:it at: 12-Sep-2001 12:47


Cassani Mario wrote:
> How can I make the above allow me to select one item > only? The values are read from a file and can be duplicated > (I must leave the duplicates and their position intact). > Maybe something different from a 'text-list may help?
I've got a style that does not have this problem. (It was developed for a particular purpose, so it's not very general and of public interest...) I can send it to you if you want. (Sending this to you directly too because it seems I cannot reach the US from here --- it was said it is because of the attack in NY.) Regards, Gabriele. -- Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/

 [5/5] from: mario:cassani:icl at: 13-Sep-2001 8:13


Ciao Gabriele,
> > How can I make the above allow me to select one item > > only? The values are read from a file and can be duplicated
<<quoted lines omitted: 3>>
> developed for a particular purpose, so it's not very general and > of public interest...) I can send it to you if you want.
Thank you, your code is always appreciated, here!
> (Sending this to you directly too because it seems I cannot reach > the US from here --- it was said it is because of the attack in > NY.) >
The crazy thing is that the message coming from Rebol/ML arrived while the one sent directly has probably been filtered by my company HQ in UK... Zaijian Mario PS Hope Echelon doesn't goes upset if I write things like "HQ in UK"... :|

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