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]
示例#2
0
文件: __init__.py 项目: Garjy/RIDE
 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)
示例#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]
示例#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
示例#5
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
示例#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)
示例#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
示例#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]
示例#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)
示例#12
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)
示例#13
0
文件: __init__.py 项目: Garjy/RIDE
 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)
示例#14
0
 def _split_from_separators(self, value):
     return utils.split_value(value)
示例#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]
示例#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]
示例#17
0
 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]
示例#18
0
 def _split_from_separators(self, value):
     return utils.split_value(value)