def add_variables(self, path, argstr, comment=None):
     self._import_controllers  # Have to exist before adding new
     import_ = self._table.add_variables(path, utils.split_value(argstr),
                                         comment)
     self._parent.mark_dirty()
     self._add_controller(import_)
     return self[-1]
Exemple #2
0
 def _validate(self, args_str):
     try:
         types = [self._get_type(arg)
                  for arg in utils.split_value(args_str)]
     except ValueError:
         return "Invalid argument syntax '%s'" % arg
     return self._validate_argument_order(types)
Exemple #3
0
 def add_library(self, name, argstr, alias, comment=None):
     import_ = self._table.add_library(name, utils.split_value(argstr), comment)
     import_.alias = alias
     self._parent.mark_dirty()
     self._import_controller(import_).publish_added()
     self.notify_imports_modified()
     return self[-1]
Exemple #4
0
 def _validate(self, args_str):
     try:
         types = [ self._get_type(arg) for arg in utils.split_value(args_str) ]
     except ValueError:
         return "Invalid argument syntax '%s'" % arg
     return self._validate_list_args_in_correct_place(types) \
            or self._validate_req_args_in_correct_place(types) or None
 def set_value(self, name, args=None, alias=''):
     self._import.name = name
     self._import.args = utils.split_value(args or [])
     self._import.alias = alias
     self._parent.mark_dirty()
     self.publish_edited()
     self.import_loaded_or_modified()
     return self
Exemple #6
0
 def add_library(self, name, argstr, alias, comment=None):
     self._import_controllers  # Call property since it has to exist before adding new
     import_ = self._table.add_library(name, utils.split_value(argstr), comment)
     import_.alias = alias
     self._parent.mark_dirty()
     self._add_controller(import_)
     self.notify_imports_modified()
     return self[-1]
 def _validate(self, args_str):
     try:
         types = [
             self._get_type(arg) for arg in utils.split_value(args_str)
         ]
     except ValueError:
         return "Invalid argument syntax '%s'" % arg
     return self._validate_argument_order(types)
Exemple #8
0
 def _validate(self, args_str):
     try:
         types = [self._get_type(arg)
                  for arg in utils.split_value(args_str)]
     except ValueError:
         return "Invalid argument syntax '%s'" % arg
     return self._validate_list_args_in_correct_place(
         types) or self._validate_req_args_in_correct_place(types) or None
Exemple #9
0
 def set_value(self, name, args=None, alias=''):
     self._import.name = name
     self._import.args = utils.split_value(args or [])
     self._import.alias = alias
     self._parent.mark_dirty()
     self.publish_edited()
     self.import_loaded_or_modified()
     return self
 def add_library(self, name, argstr, alias, comment=None):
     self._import_controllers # Call property since it has to exist before adding new
     import_ = self._table.add_library(name, utils.split_value(argstr),
                                       comment)
     import_.alias = alias
     self._parent.mark_dirty()
     self._add_controller(import_)
     self.notify_imports_modified()
     return self[-1]
Exemple #11
0
 def _validate(self, value):
     time_tokens = utils.split_value(value)
     if not time_tokens:
         return None
     timestr = time_tokens[0]
     try:
         secs = utils.timestr_to_secs(timestr)
         time_tokens[0] = utils.secs_to_timestr(secs)
     except DataError, err:
         if not '${' in timestr:
             return str(err)
 def _validate(self, value):
     time_tokens = utils.split_value(value)
     if not time_tokens:
         return None
     timestr = time_tokens[0]
     try:
         secs = utils.timestr_to_secs(timestr)
         if secs <= 0:
             raise ValueError("Timestring must be over zero")
         time_tokens[0] = utils.secs_to_timestr(secs)
     except ValueError, err:
         if '${' not in timestr:
             return str(err)
Exemple #13
0
 def _validate(self, value):
     time_tokens = utils.split_value(value)
     if not time_tokens:
         return None
     timestr = time_tokens[0]
     try:
         secs = utils.timestr_to_secs(timestr)
         if secs <= 0:
             raise ValueError("Timestring must be over zero")
         time_tokens[0] = utils.secs_to_timestr(secs)
     except ValueError, err:
         if '${' not in timestr:
             return str(err)
Exemple #14
0
 def _split_from_separators(self, value):
     return utils.split_value(value)
Exemple #15
0
 def add_variables(self, path, argstr, comment=None):
     import_ = self._table.add_variables(path, utils.split_value(argstr), comment)
     self._parent.mark_dirty()
     self._import_controller(import_).publish_added()
     return self[-1]
Exemple #16
0
 def add_variables(self, path, argstr, comment=None):
     self._table.add_variables(path, utils.split_value(argstr), comment)
     self._parent.mark_dirty()
     self._publish_setting_added(path, 'variables')
     return self[-1]
 def add_variables(self, path, argstr, comment=None):
     self._import_controllers # Have to exist before adding new
     import_ = self._table.add_variables(path, utils.split_value(argstr), comment)
     self._parent.mark_dirty()
     self._add_controller(import_)
     return self[-1]
Exemple #18
0
 def _split_from_separators(self, value):
     return utils.split_value(value)