Re: [Pyobjc-dev] Wrong spelling of tableView_objectValueForTableColumn_row_()?
Brought to you by:
ronaldoussoren
From: Ronald O. <ous...@ci...> - 2003-07-23 05:55:54
|
On Wednesday, 23 July, 2003, at 03:53, Zachery Bir wrote: > Using the TableModel.py example, I've gotten a bit further with the > GUI aspect of my app. However, when running it, I run across this > error in the Console: > > 2003-07-22 21:50:06.079 ZopeEditManager[8388] An exception has occured: > Traceback (most recent call last): > File > "release-dir/package/usr/lib/python2.2/site-packages/PyObjC/ > PyObjCTools/AppHelper.py", line 32, in runEventLoop > File > "/Users/zbir/Developer/ZopeEditManager/build/ZopeEditManager.app/ > Contents/Resources/ZopeEditController.py", line 147, in > tableView_objectValueForTableColumn_row_ > return self.current_edits_data.get((aTableColumn, rowIndex), "{%s, > %d}" % (col, rowIndex)) > TypeError: an integer is required > > Here's the method (lifted straight from the TableModel.py module): > > def tableView_objectValueForTableColumn_row_(self, aTableView, > aTableColumn, > rowIndex): > col = aTableColumn.identifier() > return self.current_edits_data.get((aTableColumn, rowIndex), > "{%s, %d}" % (col, > rowIndex)) > > Running the app built from TableModel.py gives the same error. Any > pointers? Are you using PyObjC 0.9? If you do you have to multiple inherit from NSTableDataSource (IIRC, check the class definition in TableView.py). Ronald |