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

text-list

 [1/8] from: ammoncooke:y:ahoo at: 22-May-2001 14:29


Hi, How can I add items to a text-list from another face?? How do I add Items to a text-list at all? What I need is to be able to have a user enter data to fill the text-list, I also need to be able to load a plain text file into it. Thanks!! Ammon

 [2/8] from: gjones05::mail::orion::org at: 22-May-2001 16:52


From: "Ammon Cooke"
> How can I add items to a text-list from > another face?? How do I add Items to > a text-list at all? What I need is to be > able to have a user enter data to fill the > text-list, I also need to be able to load a > plain text file into it.
Hi, Ammon, There are possibly two ways. The way I use is to change the lines path. Example: view layout [ txt "Click items in first list to add to second" tl1: text-list data ["hello" "goodbye" "goodnight"] [ append tl2/lines copy value show tl2 ] tl2: text-list ] the second thing you will eventually need is to be able to adjust the slider. Include this code in your program. Then when adjusting a text-list, use as follows: fix-slider: func [faces [object! block!]] [ foreach list to-block faces [ list/sld/redrag list/lc / max 1 length? head list/lines ] ] view layout [ tl1: text-list data ["apples" "oranges" "bananas" "pears"] button "Transfer" [ append tl2/lines tl1/data fix-slider tl2 show tl2 ] tl2: text-list 150x50 ] Several slider faces can be updated at the same time, if desired. Hope this helps. --Scott Jones

 [3/8] from: ammoncooke:ya:hoo at: 25-May-2001 14:06


Sorry about the slow response, took a while to get back to implimenting it. ;)) It does work good though. Thanks!! Ammon

 [4/8] from: ammoncooke:y:ahoo at: 25-May-2001 15:03


Just my luck! I figured it out two seconds after I pressed send. Thanks!! Ammon

 [5/8] from: hijim:pronet at: 25-Aug-2001 17:25


REBOL [] view layout [ a: text-list "[jimc--pronet--net]" "[lookforyourself--egroups--com]" [rebol-list--rebol--com] button "Test" [print a/text] ] This always prints the first item in the list, [jimc--pronet--net], no matter which item is highlighted. How do I get it to return and print the value of the item that is highlighted. There is no help on line-list. I have found out how to layout a text-list by examples in various documentation on the website. NONE of these tells how to extract a value from it. Would that be so hard? Tell how to use it as well as how to lay it out! This has got to be very simple. There is a request-list, which may be better for an email address book, but how to set that up? The help below isn't much help to a beginner. Thanks, Jim
>> ? request-list
USAGE: REQUEST-LIST titl alist /offset xy DESCRIPTION: Requests a selection from a list. REQUEST-LIST is a function value. ARGUMENTS: titl -- (Type: any) alist -- (Type: any) REFINEMENTS: /offset xy -- (Type: any)

 [6/8] from: cybarite:sympatico:ca at: 25-Aug-2001 20:40


Re: [REBOL] text-list There is a simple example showing picking of textlist values at rebsite sites/cybarite/VID Usage see select "Text List Picked Values" If you see other items that there should be expand to make that tutorial / example site better let me know.

 [7/8] from: deadzaphod:flyingparty at: 25-Aug-2001 17:39


rather than /text ,use /picked which will be a block containing one or more selected items (i'd explain in more detail, but I'm on my way out the door right now, sorry - if no-one gives a better explanation before I get back I'll post an explanation of what I've learned about text-list's then..) Cal Dixon

 [8/8] from: hijim:pronet at: 25-Aug-2001 20:49


text-list Thanks, Cal. Picked worked fine. ad-list: text-list 240x400 data read/lines %address.lst m-field: field 240x22 silver * 1.1 silver * 1.2 font-name font-fixed btn blue "Send" [ a: request/confirm "Are you connected to the Internet?" if not a [return] send to-email m-field/text my-area/text ] btn blue "Address" [ m-field/text: to-string ad-list/picked show m-field ] I had to figure out the to-string and to-email myself -- by trial and error and error and error. The to-email was just a guess. Maybe I should have guessed picked too. I did try selected. If this gets through, I've use the text editor I'm writing with the code above added to it. Makes a great address book. Thanks, Jim All I get when I try to open a rebsite is the message: Cannot open folder: http://etc I can open Anton's rebsite. I had done that before. I went to the cybarite address on the web and tried to save it, but it wanted to overwrite index.r, so I cancelled. What am I missing?