I am looking over Nick's huge document on business applications, trying to make myself a little function that will take a block of data blocks and return the data in a scrollable grid of fields. I used something of his as a model, it works fine, but I don't understand one little item and I don't like to use code I don't understand. The little item is the "with" keyword, marked on the sample script below. Can anyone explain what "with" means and when one uses it? I did scan the VID documentation on the REBOL web site and did not spot it.
Thank you.
R E B O L [
Title: "Grid layout"
Purpose: {Take a block of data consisting of two-element sub-blocks
and return a layout that has a two-column grid of the supplied data
along with a scroller.}
]
GRID-LAYOUT: func [
DATABLOCK
/local GRID DISPLAY
] [
GRID: copy [across space 0]
forskip DATABLOCK 2 [
append GRID compose [
info 100 (form DATABLOCK/1)
info 200 (form DATABLOCK/2)
return
]
]
DISPLAY: layout [
across
DISPBOX: box 300x500 with [ ;;;;; What is the "with" keyword?
pane: layout/tight GRID pane/offset: 0x0
]
scroller 20X500 [
DISPBOX/pane/offset/y: DISPBOX/size/y - DISPBOX/pane/size/y * value
show DISPBOX
]
]
return DISPLAY
]
;;Uncomment to test
view GRID-LAYOUT [
"01" "AAAA"
"02" "BBBB"
"03" "CCCC"
"04" "DDDD"
"05" "EEEE"
"06" "FFFF"
"07" "GGGG"
"08" "HHHH"
"09" "IIII"
"10" "JJJJ"
"11" "KKKK"
"12" "LLLL"
"13" "MMMM"
"14" "NNNN"
"15" "OOOO"
"16" "PPPP"
"17" "QQQQ"
"18" "RRRR"
"19" "SSSS"
"20" "TTTT"
"21" "UUUU"
"22" "VVVV"
"23" "WWWW"
"24" "XXXX"
"25" "YYYY"
"26" "ZZZZ"
]