I believe I have resolved the problem; it will be patched in the next release, and modulo the typo correction I noted your example should work as intended.
As a general design note, I do not recommend directly exposing internal widgets of contraptions and banging on them from the outside; this is very brittle and makes it difficult to revise the design of the contraption or maintain internal constraints. Instead of exposing a slider via an attribute:
on get_slider do slider1 end
And then both updating the slider value and firing an event from the outside:
on click do s: prototype11.slider s.value: s.value + 1 s.event["change" s.value + 1] end
You could instead expose a function for incrementing the slider's value (and all the necessary consequences) on the contraption:
on get_inc do on inc do slider1.value:slider1.value + 1 slider1.event["change" slider1.value + 1] end end
And call it from the outside like so:
on click do prototype11.inc[] end
Or, alternatively, you could expose both "get_" and "set_" attributes on the contraption which likewise hide any side effects that are needed:
on get_v1 do slider1.value end on set_v1 x do slider1.value:x slider1.event["change" x] end
And then from the outside it looks exactly like the read/write attributes of a primitive widget:
on click do prototype11.v1:prototype11.v1 + 1 end