Exemplo n.º 1
0
 def addRow(self, rowObject, state="edited"):
     if self._objDict.has_key(rowObject):
         raise DuplicateObjectReference,\
               _("Attempted to add a row twice")
     if self.delegate('will_add_row', args=rowObject):
         self._objDict[rowObject] = {}
         self._objDict[rowObject]['state'] = state
         self._addRow(rowObject)
Exemplo n.º 2
0
 def addRow(self,rowObject,state="edited"):
     if self._objDict.has_key(rowObject):
         raise DuplicateObjectReference,\
               _("Attempted to add a row twice")
     if self.delegate ('will_add_row', args=rowObject):
         self._objDict[rowObject] = {}
         self._objDict[rowObject]['state']=state
         self._addRow(rowObject)
 def string(self):
     value = v = self.getValue()
     for i in self._printers:
         v = i(value)
         if v is not None:
             break
     if v is None and value is not None:
         self.pushStatus(_('Unable to represent "%s"') % (`value`,), timeout=10, type='warn')
         value = None
     else:
         value = v
     return value
 def parse(self):
     value = v = self._doGetValue()
     self.debug ('got value %s' % value)
     for i in self._parsers:
         v = i(value)
         if v is not None:
             break
     if v is None and value is not None:
         self.pushStatus(_('Unable to parse "%s"') % (`value`,), timeout=10, type='warn')
         value = None
     else:
         value = v
     return value
 def string(self):
     value = v = self.getValue()
     for i in self._printers:
         v = i(value)
         if v is not None:
             break
     if v is None and value is not None:
         self.pushStatus(_('Unable to represent "%s"') % ( ` value `, ),
                         timeout=10,
                         type='warn')
         value = None
     else:
         value = v
     return value
 def parse(self):
     value = v = self._doGetValue()
     self.debug('got value %s' % value)
     for i in self._parsers:
         v = i(value)
         if v is not None:
             break
     if v is None and value is not None:
         self.pushStatus(_('Unable to parse "%s"') % ( ` value `, ),
                         timeout=10,
                         type='warn')
         value = None
     else:
         value = v
     return value