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

[REBOL] Re: Little questions, big answers...

From: allenk:powerup:au at: 7-Sep-2001 0:03

her suspect there is some way of avoiding the necessity of
> actually writing this out and then reading it back, but at least I have > some confidence that that would work, and I can then work on improving > the technique.
You can also write your layout block on the fly. Anton showed a way to add created faces (using get-style) into a layout. An alternative is to output the VID code for the required layout on the fly and then view it. Although not everyone may "get" this example, it just shows that mixing REBOL code and data as code is a fun and poweful way to create dynamic layouts. e.g.. names: ["John" "Fred" "Bill" "James" "Jenny"] lay: copy [across] ; a reusable action block press-action: [ ; print the text value from the object next to me probe get in first next find face/parent-face/pane :face 'text ] foreach name names [ append lay compose [ button "Choose" press-action text (name) return ] ] ; to see the VID dialect block we have generated ; probe lay view layout lay Cheers, Allen K Tomorrow I will post a demo for using Lists.