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

[REBOL] Re: Question: Passing values to a text-list

From: gjones05:mail:orion at: 7-Jun-2001 12:10

From: "Aviles, Javier"
> I have this function, that returns a block. > > request-multlist: func [ > "Requests a selection from a list." > titl alist /offset xy /local rslt list-lay list-tar > ][ > list-tar: [] > list-lay: layout [ > vh2 titl > across > text-list data alist [rslt: value hide-popup] > arrow left > [ > if not none? rslt > [ > insert alist rslt > remove list-tar rslt > rslt: none > unfocus > show list-lay > ] > ] > arrow right > [ > if not none? rslt > [ > insert list-tar rslt > remove alist rslt > rslt: none > unfocus > show list-lay > ] > ] > text-list data list-tar [rslt: value hide-popup > ] return > across > button "Ok" [unview list-lay] > button "Cancel" [unview list-lay] > ] > rslt: none > either offset [view/offset/new list-lay xy] [view/new list-lay] > list-tar > ] > > if I want that the block returned by request-multlist function be the
entry
> for a text-list facet, What I should do?
... Hi, Javier, I was unsure exactly how you wanted the different components to interact. So I simplified the function, but hopefully you will be able to adapted the methods to better fit your needs: request-multlist: func [ "Requests a selection from a list." titl alist /offset xy /local rslt list-lay list-tar ][ list-tar: copy [] list-lay: layout [ vh2 titl across tl1: text-list data alist [ append tl2/lines tl1/picked remove find tl1/data tl1/picked show [tl1 tl2] ] tl2: text-list [ append tl1/lines tl2/picked remove find tl2/data tl2/picked show [tl1 tl2] ] return across button "Ok" [list-tar: copy tl2/data hide-popup ] button "Cancel" [hide-popup ] ] either offset [inform/offset list-lay xy] [inform list-lay] list-tar ] probe request-multlist "name" ["cat" "dog" "tree"] --Scott Jones