[lively-kernel] request for info about some "spec" parameters of connections

Robert Krahn robert.krahn at gmail.com
Tue Sep 16 20:23:07 CEST 2014


The varMapping aspect might need some explanation: With plain JS it is not
possible to capture the internal state of functions (closures, closed
values). The data bindings, as well as scripts you attach to objects,
however, should be serializable. This means we need to capture this state
somehow. When you want  converters / updaters / scripts to be real closures
you can use the "varMapping" option to pass in values from the outside. The
underlaying mechanism is implemented in the lively.Closure
class: $world.browseCode("lively.Closure", null, "lively.lang.Closure");

On Tue, Sep 16, 2014 at 8:33 AM, Davide Della Casa <davidedc at gmail.com>
wrote:

> Looking at this, spec for connections:
>
>                  + 'spec can be: {\n'
>                  + '  removeAfterUpdate: Boolean,\n'
>                  + '  forceAttributeConnection: Boolean,\n'
>                  + '  converter: Function,\n'
>                  + '  updater: Function,\n'
>                  + '  varMapping: Object\n'
>                  + '}',
>
> converter and updater are explained in a couple of docs, that’s cool.
>
> Any insight/organic explanation about what the others (removeAfterUpdate,
> forceAttributeConnection, varMapping) do and in which context they are
> necessary/useful? Online somewhere, papers anywhere, previous email threads?
>
> If not, can anybody give a sketch in this thread?
>
> Cheers!
> Davide Della Casa
> _______________________________________________
> lively-kernel mailing list
> lively-kernel at hpi.uni-potsdam.de
> http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hpi.uni-potsdam.de/archive/lively-kernel/attachments/20140916/2f751ad1/attachment-0001.html>


More information about the lively-kernel mailing list