Loading py_mvvm/trame_binding/binding.py +7 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,13 @@ class Communicator: # and a linked_object (passed during bind creation from ViewModel side) self.state_variable_name = state_variable_name # we need to make sure state variable exists on connect since if it does not - Trame will not monitor it if state_variable_name: self.state.setdefault(self.state_variable_name, None) for attribute_name in self.linked_object_attributes or []: name_in_state = self.get_name_in_state(attribute_name) self.state.setdefault(name_in_state, None) # this updates ViewModel on state change if self.viewmodel_linked_object: if self.linked_object_attributes: Loading pyproject.toml +1 −1 Original line number Diff line number Diff line [tool.poetry] name = "py-mvvm" version = "0.1.2" version = "0.1.0" description = "A Python Package for Model-View-ViewModel pattern" authors = ["Yakubov, Sergey <yakubovs@ornl.gov>"] license = "MIT" Loading Loading
py_mvvm/trame_binding/binding.py +7 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,13 @@ class Communicator: # and a linked_object (passed during bind creation from ViewModel side) self.state_variable_name = state_variable_name # we need to make sure state variable exists on connect since if it does not - Trame will not monitor it if state_variable_name: self.state.setdefault(self.state_variable_name, None) for attribute_name in self.linked_object_attributes or []: name_in_state = self.get_name_in_state(attribute_name) self.state.setdefault(name_in_state, None) # this updates ViewModel on state change if self.viewmodel_linked_object: if self.linked_object_attributes: Loading
pyproject.toml +1 −1 Original line number Diff line number Diff line [tool.poetry] name = "py-mvvm" version = "0.1.2" version = "0.1.0" description = "A Python Package for Model-View-ViewModel pattern" authors = ["Yakubov, Sergey <yakubovs@ornl.gov>"] license = "MIT" Loading