Ah, that does help!
Idea for posting data back to a control, I think an API call with the name would be the way to go (and would need some basic string support).
updateControl('MySlider', 0.5)
updateControl('MyRGBColor', 0.5, 0.2, 0)
I’m thinking this would then trigger control handler functions when called via code.
If called inside the same control handler it shouldn’t trigger another update (no infinite loops), but would be useful if it still kept the updated value.
If called from other control handlers, it might set off a chain-reaction, but I think to avoid an infinite loop I would keep a flag and only fire any given control handler once per original call.
This way you could make some controls dependent on others with feedback in the UI, but won’t shoot yourself in the foot too easily. I don’t exactly have a use case for that in mind, but it might open up some interesting applications.
@jeff, is this close to what you were looking for with 2-way data binding? Too complex, unforseen gotchas?