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

[REBOL] Re: questions about VID and parse.

From: gscottjones:mchsi at: 10-Mar-2002 16:42

From: "Bansard Stephane"
>... > Thanks a lot for your fully functional example. This way i can progress! > >[...] > > a: ["first" "second"] > > layout-data: copy [] > > foreach datum a [ > > append layout-data [text] > > append layout-data datum > > ] > > view layout layout-data > > So basically, I have to create a block like > [text "item1" text "item2" text "item3], right? > It seems there is not way to write a function to avoid rebuilding a new
list. Hi, Stephane, Perhaps I have inadvertantly caused some confusion. Perhaps I do not exactly understand the functionality that you seek. Communications can be so fragile at times. As you may well know, /View is REBOL's gui extension. Although /View can be programmed directly, most prefer to use the dialect extension VID (video interface dialect). A block of interface description language is presented to the layout command, which can interpret the block into a form presentable for the view command. Hence, one frequently will use the following sequence for a quick layout: view layout [ text "Hello" text "Goodbye" ] The block (bracketed text) is presented to 'layout which then digests the dialect for use by 'view. Alternatively, some let 'layout process the block and later present the information to 'view: lo: layout [ text "Hello" text "Goodbye" ] view lo When you asked your question earlier, I made some assumptions, which is always very hazardous. I assumed that you were needing a way to present dynamically generated data in a window as in text-type format (aka a type of label). My simplisitic method allowed for a block of text values to then be laid out in a VID dialect block that is then presentable for 'layout. Does this make sense? If you simply need to format labels in a window and already know the labels, I would recommend one of the static methods mentioned herein. However, if you don't know what the labels are in advance, then consider using some variation on the theme that I gave in the last email. Have I caused more confusion? Regards, --Scott Jones