parameters: (self, row, col, value)
docstring: Transfer of cell value to object.
docstring_summary: Transfer of cell value to object.
docstring_tokens: Transfer of cell value to object .
function: def SetValue(self, row, col, value):
          """
          Transfer of cell value to object.
          """
          id, attrconf = self.get_id_attrconf(row, col)
          if attrconf is not None:
  
              if attrconf.is_writable():
                  mt = attrconf.metatype
                  # print 'SetValue(%d, %d, "%s").\n' % (row, col, value)
  
                  # print '    attrconf',id,attrconf.attrname, attrconf.is_writable(),hasattr(attrconf,'choices')
                  # attr=self.attrs[col]
                  tt = type(attrconf.get_default())
                  if hasattr(attrconf, 'choices'):
                      # print '  type(attrconf.choices)',type(attrconf.choices),type(attrconf.choices) in (OrderedDict, types.DictionaryType)
                      # (types.ListType, types.TupleType):
                      if type(attrconf.choices) in (OrderedDict, types.DictionaryType):
                          # print '  set choices[value]',attrconf.choices[value]
                          if attrconf.choices.has_key(value):
                              attrconf[id] = attrconf.choices[value]
                          else:
                              attrconf[id] = value
  
                      else:
                          # print '  set value',value
                          attrconf[id] = value
                  elif mt == 'id':
                      attrconf[id] = attrconf.get_linktab().get_id_from_formatted(value)
  
                  elif (tt in NUMERICTYPES):
                      # set only values of types that are allowed for the grid
                      # TODO: this grid types data must be organized more central
                      attrconf[id] = value
                  else:
                      # TODO: for other types, like color or arrays, this must be done beforehand
                      print 'WARNING in SetValue: cannot write to this type:', tt
              else:
                  # readonly
                  pass
function_tokens: def SetValue ( self , row , col , value ) : id , attrconf = self . get_id_attrconf ( row , col ) if attrconf is not None : if attrconf . is_writable ( ) : mt = attrconf . metatype # print 'SetValue(%d, %d, "%s").\n' % (row, col, value) # print '    attrconf',id,attrconf.attrname, attrconf.is_writable(),hasattr(attrconf,'choices') # attr=self.attrs[col] tt = type ( attrconf . get_default ( ) ) if hasattr ( attrconf , 'choices' ) : # print '  type(attrconf.choices)',type(attrconf.choices),type(attrconf.choices) in (OrderedDict, types.DictionaryType) # (types.ListType, types.TupleType): if type ( attrconf . choices ) in ( OrderedDict , types . DictionaryType ) : # print '  set choices[value]',attrconf.choices[value] if attrconf . choices . has_key ( value ) : attrconf [ id ] = attrconf . choices [ value ] else : attrconf [ id ] = value else : # print '  set value',value attrconf [ id ] = value elif mt == 'id' : attrconf [ id ] = attrconf . get_linktab ( ) . get_id_from_formatted ( value ) elif ( tt in NUMERICTYPES ) : # set only values of types that are allowed for the grid # TODO: this grid types data must be organized more central attrconf [ id ] = value else : # TODO: for other types, like color or arrays, this must be done beforehand print 'WARNING in SetValue: cannot write to this type:' , tt else : # readonly pass