I'm working with a switch that has a lot of repetitive patterns:
i.e.:
switch/default type[
"button" [append auto do-button name layout]
"checkbox" [append auto do-checkbox name layout]
"time" [append auto do-time name layout]
"hidden" [append auto do-hidden name layout]
"radio" [append auto do-radio name layout]
;; ... which is tedious. But works
;; Now I want to simplify using 'load and 'do.
;; As in the following
output: copy []
foreach plist glbs/plists[
foreach [name layout] plist[
type: select layout "type"
code: load rejoin["append output do-" type " name layout"]
?? code ;; see code "dump" below
do code
]
]
code: [append output do-text name layout ] ;; dump from ?? code
;; some abbreviation of code here, of course
;; with the second method, rebol stops me with the following error
;; message:
output has no value
;; say what? I thought 'load was supposed to bind words to global
;; context!
any help would be appreciated. I'd hate to do all that 'switch coding.
thanks
tim
--
Tim Johnson <[EMAIL PROTECTED]>
http://www.alaska-internet-solutions.com
--
To unsubscribe from the list, just send an email to
lists at rebol.com with unsubscribe as the subject.