|
@@ -1,7 +1,7 @@
|
|
|
"""
|
|
"""
|
|
|
Generated by Statechart compiler by Glenn De Jonghe, Joeri Exelmans, Simon Van Mierlo, and Yentl Van Tendeloo (for the inspiration)
|
|
Generated by Statechart compiler by Glenn De Jonghe, Joeri Exelmans, Simon Van Mierlo, and Yentl Van Tendeloo (for the inspiration)
|
|
|
|
|
|
|
|
-Date: Mon May 28 13:02:47 2018
|
|
|
|
|
|
|
+Date: Mon May 28 17:37:57 2018
|
|
|
|
|
|
|
|
Model author: Yentl Van Tendeloo
|
|
Model author: Yentl Van Tendeloo
|
|
|
Model name: Modelverse Visual Editor - Tkinter Version
|
|
Model name: Modelverse Visual Editor - Tkinter Version
|
|
@@ -4812,7 +4812,7 @@ class AttributeEditor(RuntimeClassBase, tk.Toplevel, SCCDWidget):
|
|
|
|
|
|
|
|
def _all_init_create_entries_create_entry_enter(self):
|
|
def _all_init_create_entries_create_entry_enter(self):
|
|
|
current_attr = self.attrs_modify.popitem()
|
|
current_attr = self.attrs_modify.popitem()
|
|
|
- self.current_attr = {'name': current_attr[0], 'type': current_attr[1][0][1:-1], 'optional': current_attr[1][1]}
|
|
|
|
|
|
|
+ self.current_attr = {'name': current_attr[0], 'type': current_attr[1][0], 'optional': current_attr[1][1]}
|
|
|
|
|
|
|
|
def _all_init_create_entries_create_entry_exit(self):
|
|
def _all_init_create_entries_create_entry_exit(self):
|
|
|
print("INC counter")
|
|
print("INC counter")
|
|
@@ -4831,7 +4831,7 @@ class AttributeEditor(RuntimeClassBase, tk.Toplevel, SCCDWidget):
|
|
|
self.big_step.outputEventOM(Event("create_instance", None, [self, 'names', 'Entry', {'parent': self, 'name': self.current_attr['name'], 'value': self.current_attr['name']}]))
|
|
self.big_step.outputEventOM(Event("create_instance", None, [self, 'names', 'Entry', {'parent': self, 'name': self.current_attr['name'], 'value': self.current_attr['name']}]))
|
|
|
|
|
|
|
|
def _all_init_create_entries_create_entry_type_dropdown_create_enter(self):
|
|
def _all_init_create_entries_create_entry_type_dropdown_create_enter(self):
|
|
|
- self.big_step.outputEventOM(Event("create_instance", None, [self, 'types', 'DropDown', {'parent': self, 'name': self.current_attr['name'], 'value': self.current_attr['type'], 'options': self.allowed_types}]))
|
|
|
|
|
|
|
+ self.big_step.outputEventOM(Event("create_instance", None, [self, 'types', 'DropDown', {'parent': self, 'name': self.current_attr['name'], 'value': self.allowed_types[self.current_attr['type']], 'options': self.allowed_types.keys()}]))
|
|
|
|
|
|
|
|
def _all_init_create_entries_create_entry_optional_button_create_enter(self):
|
|
def _all_init_create_entries_create_entry_optional_button_create_enter(self):
|
|
|
self.big_step.outputEventOM(Event("create_instance", None, [self, 'optional', 'ToggleButton', {'parent': self, 'on_activate': 'optional_%s' % self.current_attr['name'], 'on_deactivate': 'mandatory_%s' % self.current_attr['name'], 'active': self.current_attr['optional'], 'tooltip_text': 'Optional attribute?', 'visual': TextVisual('optional')}]))
|
|
self.big_step.outputEventOM(Event("create_instance", None, [self, 'optional', 'ToggleButton', {'parent': self, 'on_activate': 'optional_%s' % self.current_attr['name'], 'on_deactivate': 'mandatory_%s' % self.current_attr['name'], 'active': self.current_attr['optional'], 'tooltip_text': 'Optional attribute?', 'visual': TextVisual('optional')}]))
|
|
@@ -4843,7 +4843,7 @@ class AttributeEditor(RuntimeClassBase, tk.Toplevel, SCCDWidget):
|
|
|
self.big_step.outputEventOM(Event("create_instance", None, [self, 'add_attribute_button', 'Button', {'parent': self, 'event_parameters': 'create', 'visual': TextVisual('new'), 'tooltip_text': 'Add a new attribute'}]))
|
|
self.big_step.outputEventOM(Event("create_instance", None, [self, 'add_attribute_button', 'Button', {'parent': self, 'event_parameters': 'create', 'visual': TextVisual('new'), 'tooltip_text': 'Add a new attribute'}]))
|
|
|
|
|
|
|
|
def _all_change_type_enter(self):
|
|
def _all_change_type_enter(self):
|
|
|
- self.big_step.outputEventOM(Event("broad_cast", None, [self, Event("mv_request", None, ['attr_type', [current_model, self.as_element, self.parameter[0], self.parameter[1]]])]))
|
|
|
|
|
|
|
+ self.big_step.outputEventOM(Event("broad_cast", None, [self, Event("mv_request", None, ['attr_type', [current_model, self.as_element, self.parameter[0], self.allowed_types[self.parameter[1]]]])]))
|
|
|
|
|
|
|
|
def _all_change_name_waiting_enter(self):
|
|
def _all_change_name_waiting_enter(self):
|
|
|
self.addTimer(0, 1.0)
|
|
self.addTimer(0, 1.0)
|
|
@@ -4884,11 +4884,11 @@ class AttributeEditor(RuntimeClassBase, tk.Toplevel, SCCDWidget):
|
|
|
def _all_init_get_attr_types_0_exec(self, parameters):
|
|
def _all_init_get_attr_types_0_exec(self, parameters):
|
|
|
result = parameters[0]
|
|
result = parameters[0]
|
|
|
print("Resolving " + str(self.allowed_types))
|
|
print("Resolving " + str(self.allowed_types))
|
|
|
- self.allowed_types = result
|
|
|
|
|
- self.resolved_allowed_types = set()
|
|
|
|
|
|
|
+ self.allowed_types = list(result)
|
|
|
|
|
+ self.resolved_allowed_types = {}
|
|
|
|
|
|
|
|
def _all_init_resolve_name_of_attr_type_request_0_exec(self, parameters):
|
|
def _all_init_resolve_name_of_attr_type_request_0_exec(self, parameters):
|
|
|
- self.big_step.outputEventOM(Event("broad_cast", None, [self, Event("mv_request", None, ['read_attrs', [current_model, self.allowed_types.pop()]])]))
|
|
|
|
|
|
|
+ self.big_step.outputEventOM(Event("broad_cast", None, [self, Event("mv_request", None, ['read_attrs', [current_model, self.allowed_types[0]]])]))
|
|
|
|
|
|
|
|
def _all_init_resolve_name_of_attr_type_request_0_guard(self, parameters):
|
|
def _all_init_resolve_name_of_attr_type_request_0_guard(self, parameters):
|
|
|
return self.allowed_types
|
|
return self.allowed_types
|
|
@@ -4901,8 +4901,7 @@ class AttributeEditor(RuntimeClassBase, tk.Toplevel, SCCDWidget):
|
|
|
|
|
|
|
|
def _all_init_resolve_name_of_attr_type_response_0_exec(self, parameters):
|
|
def _all_init_resolve_name_of_attr_type_response_0_exec(self, parameters):
|
|
|
result = parameters[0]
|
|
result = parameters[0]
|
|
|
- print("Got attrs: " + str(result))
|
|
|
|
|
- self.resolved_allowed_types.add(result["name"])
|
|
|
|
|
|
|
+ self.resolved_allowed_types[result["name"]] = self.allowed_types.pop(0)
|
|
|
|
|
|
|
|
def _all_init_get_defined_attrs_0_exec(self, parameters):
|
|
def _all_init_get_defined_attrs_0_exec(self, parameters):
|
|
|
result = parameters[0]
|
|
result = parameters[0]
|