very useful for binding with the params system or a larger script. in this case, update would simply skip setting a new value to value and just send it to action.
params:add {
type = 'control',
id = 'foo',
controlspec = cs.new(0, 1),
action = engine.thing
}
foo = _grid.control {
controlspec = params:lookup_param('foo').controlspec,
value = function() return params:get('foo') end,
action = function(s, v) params:set('foo', v) end
}
very useful for binding with the params system or a larger script. in this case,
update
would simply skip setting a new value tovalue
and just send it toaction
.