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

Text-lists and what is displayed

 [1/2] from: adl::absentis::com at: 14-Nov-2005 14:06


Hello I have a philosophical query. Yesterday while putting together a little script I had a collection of objects, each of which has several fields. I needed to get the user to choose between them but of course I can't just set a text-list data to the list of objects. Instead I have to create a list of 'titles' from the data with some sort of 'key' embedded so that i can look up the chosen object afterwards. In other dev environments normally you can simply set the list of objects as data and then provide a function which provides the list with the display text. Basically my question is; am I right in thinking that I am limited in this way, I'm not missing something am I? If so is there any advice to making this as smooth a process as possible? thanks Andrew

 [2/2] from: antonr::lexicon::net at: 15-Nov-2005 22:05


Hi Andrew, I wrote a script which hopefully demonstrates how to list a selection of your type of data. http://www.lexicon.net/antonr/rebol/gui/iterated/text-list-of-objects.r You can try it by simply DOing the url above from the rebol/view console. The technique is very flexible, you can put any kind of code in there to select (or derive) the text strings for each line. (I tested on Rebol/View 1.3.1.3.1, if you have only the older View 1.2.1.x.x, then BTN should be changed to BUTTON.) Regards, Anton.