Re: [Pyobjc-dev] Wrong spelling of tableView_objectValueForTableColumn_row_()?
Brought to you by:
ronaldoussoren
From: Zachery B. <zb...@ur...> - 2003-07-23 10:41:55
|
On Wednesday, July 23, 2003, at 01:54 AM, Ronald Oussoren wrote: > 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). Nope, this is off CVS. Your TableModel doesn't extend NSTableDataSource, either. Oh, poo. I wonder if I'm using a 1.0b1 example and 0.9. Yup. zbir@gorilla $ python Python 2.2.2 (#1, 03/31/03, 04:38:35) [GCC Apple cpp-precomp 6.14] on darwin Type "help", "copyright", "credits" or "license" for more information. mpor>>> import objc >>> objc.__version__ '0.9' Thanks, Zac |