On Tue, May 22, 2012 at 12:57:24PM +0200, Alexander Burger wrote:
> Consider this code fragment
> 
>    (gui '(+Button) "Do something"
>       '(dialog (env '(Foo Bar Baz (Cnt . 3)) 'X (calcX))
>          (<grid> 2
>             ... directly using Foo, Bar, Baz, Cnt, and X ... )
>          (okButton) ) )
> 
> When the button "Do something" is pressed, the environment (i.e. the
> variables Foo, Bar and Baz and their current values, plus Cnt and X) is
> passed through the round-trip of the HTTP POST transaction to the HTML
> form building the dialog. The code in the dialog (here in the '<grid>'
> body) can simply "use" these variables.
> 
> There is only a single place where these variables are "declared", the
> rest is abstracted away because the whole environment is passed into the
> dialog.

Forgot to explain:

While the above fragment (with a call to 'env' to _build_up_ the
environment, and also the runtime code to _use_ that environment) is in
the application domain, is the corresponding call to 'job' (to _set_up_
the environment) in "@lib/form.l".
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to