tynet-lichat/shirakumo - IRC Chatlog
Search
12:41:18
shinmera
Typically in alloy a component does not actually carry the value that it represents in the interface
12:41:37
shinmera
Instead, it is linked to a "data" object, which encapsulates the access of that value.
12:42:25
shinmera
So for instance if you want to show a local variable in a UI, you do this via a simple data object that wraps a setter and getter closure. If a component changes the value, the setter is called, updating the local binding.
12:42:44
shinmera
If other components are also attached to that same data, they will get notified and can update their display, too.
12:43:30
shinmera
The confusion now enters when you have an object that exhibits multiple "properties" that you would like to display
12:44:35
shinmera
But if you now switch out the object you're displaying, you need to update each respective property data, rather than having one central "thing" that you update
12:45:22
shinmera
So the question becomes: should there be a data type that can observe multiple properties at once, and if so, how do we tell a component which of those properties to even observe?