def callback(path, node, editor): if path == "info.enter.act_name": parent = self.editable_info.enter idx = parent.act_name.get_index() arglist = node._choice_provider.arglists[idx] parent.clear_tail() TypedValueBuilder.add_fields_with_template(parent, self.arg_desc, *arglist) elif path == "info.leave.act_name": parent = self.editable_info.leave idx = parent.act_name.get_index() arglist = node._choice_provider.arglists[idx] parent.clear_tail() TypedValueBuilder.add_fields_with_template(parent, self.arg_desc, *arglist) refresh_handler()
def callback(path, node, editor): if path == "info.enter.act_name": parent = self.editable_info.enter idx = parent.act_name.get_index() arglist = node._choice_provider.arglists[idx] parent.clear_tail() TypedValueBuilder.add_fields_with_template( parent, self.arg_desc, *arglist) elif path == "info.leave.act_name": parent = self.editable_info.leave idx = parent.act_name.get_index() arglist = node._choice_provider.arglists[idx] parent.clear_tail() TypedValueBuilder.add_fields_with_template( parent, self.arg_desc, *arglist) refresh_handler()
def __init__(self, uid, tree): self.tree = tree self.uid = uid self.children = [] self.parent = None self.editable_info = TypedValueBuilder.build_object(self.EIT, "info")