Ejemplo n.º 1
0
 def savePressed(self, event):
     print "save pressed"
     r = Repository()
     selectedNode = self.pathList.selectedValue
     if selectedNode:
         selectedID = r.symbolIndexForString(selectedNode)
         attributeName = self.attributesList.selectedValue
         if attributeName:
             attributeID = r.symbolIndexForString(attributeName)
             attributeValue = self.currentEditor.text
             valueID = r.symbolIndexForString(attributeValue)
             result = r.add(selectedID, attributeID, valueID)
             print "Result", result
Ejemplo n.º 2
0
 def addAttributePressed(self, event):
     print "add atribute pressed"
     selectedNode = self.pathList.selectedValue
     if selectedNode:
         attributeName = self.newAttributeTextField.text
         if attributeName:
             attributeValue = self.currentEditor.text
             print "attributeName", attributeName
             print "value", attributeValue
             r = Repository()
             selectedID = r.symbolIndexForString(selectedNode) 
             attributeID = r.symbolIndexForString(attributeName)
             valueID = r.symbolIndexForString(attributeValue)
             result = r.add(selectedID, attributeID, valueID)
             print "Result", result
             # refresh list
             self.pathListClicked(None)