mycroft-core
mycroft-core copied to clipboard
self.gui does not sync dicts correctly
the base gui class only syncs values for top level keys
- self.gui["x"] = y -> syncs
- self.gui["some_dict"]["x"] = y -> does not sync
proposed fix
https://github.com/HelloChatterbox/HolmesV/commit/64b77f297eadda6eca55f1e990934d5ba867d1cc
Hmm, haven't run into this, but I'm sure we will as GUI's get more complicated.
Would this be easier if we shift the dict to be it's own dict eg, self.gui.data[key]?
i hit this here https://github.com/OpenVoiceOS/OVOS-workshop/blob/master/ovos_workshop/frameworks/playback/interface.py#L484
i was assigning 2 keys under "media" and they did not propagate, because they dont hit the __set__ method from the GUI class. also note that each assignment sends 1 bus message, so that linked method now is optimized to send 1 bus message only