[REBOL] Re: Passing arguments to a function in another script
From: gregg::pointillistic::com at: 7-Feb-2008 9:53
Hi Bob,
BW> mylay: layout[
BW> firstvar: 3
BW> secondvar: 2
BW> button [do %arithfunc.r sum firstvar secondvar]
BW> ]
BW> view mylay
When you run this code, you should see two errors about misplaced
items in the console. Is that not happening?
You can't set the vars inside LAYOUT, because LAYOUT is a dialected
function. True, it understands plain REBOL code in certain areas, and
you can set words to face references, but you want to separate your
regular code from your UI layout code.
This works:
firstvar: 3
secondvar: 2
mylay: layout[
button [do %arithfunc.r sum firstvar secondvar]
]
view mylay
-- Gregg