[lively-kernel] request for info about some "spec" parameters of connections
Marko Röder
m.roeder at photon-software.de
Tue Sep 16 19:26:26 CEST 2014
Hi Davide -
Those attributes work as follows:
removeAfterUpdate: If you set this to true, the connection will be removed after it was called one time (one-time connection).
forceAttributeConnection: If this is set to true, executing a method that is the connection source will not trigger the target to update but changing the source attribute to a different value/function will (example: see lively.bindings.tests.BindingTests.ConnectionTest -> test42ForceAttributeConnection and play with the forceAttributeConnection flag).
varMapping: Additional variables/values you want to have access to in the updater and converter function. Usually, there is "source" and "target" mapped into the scope of those functions.
Some things may be hard to discover within the code but everything is open and accessible ;-). A lot of the times, test cases also help with APIs and features.
I hope this helps,
- Marko
On 16 Sep 2014, at 08:33, 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
More information about the lively-kernel
mailing list