Spontaneously, I’d adjust the old-style signal connection with the new-style method of connecting, maybe that will make things a little more clear what’s going on.
self.uiMainWindow.uiUnitExtensionTable.itemChanged.connect(self.testPrint)
Wasn’t sure about how to convert the other arguments, but this self.uiMainWindow.uiUnitExtensionTable.itemChanged is a signal that you are attempting to call directly, and is why you’re getting the error. If you’re looking to emit the arguments with it, you’ll need to pass them to .emit() instead.
self.uiMainWindow.uiUnitExtensionTable.itemChanged.emit(self.uiMainWindow.uiUnitExtensionTable.currentItem)
See here about old-style versus new-style.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/e92615c3-c92f-464b-acde-487d50976d10%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
self.uiMainWindow.uiUnitExtensionTable.itemDoubleClicked.connect(self.testData)self.uiMainWindow.uiUnitExtensionTable.itemChanged.connect(self.testPrint)def testPrint(self):try:self.newData = self.uiMainWindow.uiUnitExtensionTable.currentItem().text()row = self.uiMainWindow.uiUnitExtensionTable.currentItem().row()print self.uiMainWindow.uiUnitExtensionTable.verticalHeaderItem(row).text()print "Item changed"if self.newData != self.currentData:print "Old data", self.currentDataprint "New data", self.newDataelse:print "No new data", self.currentDataexcept:passdef testData(self):try:print "cell entered"self.currentData = self.uiMainWindow.uiUnitExtensionTable.currentItem().text()except:pass
--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/yXV-Dg66jiU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmODTWiZV%3D8EEcpPmaRwQcaSnqsFrRGYrgg_yen%2Bn%3DM853A%40mail.gmail.com.