wip dynamic prop event system
Created by: MartinHN
Hi again, thats a simplified version of dynamic events : features :
- clone are fast to rebuild when moved
- modifying any dynamicProps never rebuilds widgets so if a different prop of the same widget is used elsewhere, it wont be notified (these loop can get quite big), i.e modifying a color of a button was triggering reevaluation of all widget listening to the value of the button
while doing that I needed to modify other parts :
- I've found a bug in OSC{} , where multiple props in a widget can not all be notified if they use the same OSC address
- i needed to add event specific removeContext functionality (when dealing with linkedProps and linkedPropsValue)
- I kept the listener that was deleted on the first edit of edit-field input (I think it was there because widget recreation on prop changed was triggering a rebuild of the editor every time)
usability
- I've tested it quite intensely and it seems to respond correctly, i.e detaching and adding listeners on the go.
- the part I havent tested yet is the integration with undo/redo, I suspect that it needs to comply with the setters
my personal thought :
- obviously the complexity is increased compared to systematic widget rebuild, but I think that's a true bottle neck (at least for my use) and it forces a unified syntax to modify props
- the complexity may seem to add some heavy array manipulation for each propChange but it is far from the rebuild overhead
- I'm quite open to discuss on the implementation, I'm not forcing o-s-c to go this way as it can be risky to assume the hypothetical bug, It's more that I personally need the functionality, so I share!