I have a combo box on a form which I am populating via a data source. I
have a manager class that handles the data source, as follows (some material
omitted to save space):
class WordTypeManager( Foundation.NSObject, AppKit.NSComboBoxDataSource ):
def comboBox_objectValueForItemAtIndex_( self, comboBox, index ):
return self.query[ index ][ 'long_type' ]
When I run my program, I get the following error:
AttributeError: No selector comboxBox:objectValueForItemAtIndex:
Traceback (most recent call last):
File
"/Users/thoth/Source/Build/dictionary.app/Contents/Resources/Main.py", line
13, in ?
class WordTypeManager( Foundation.NSObject, AppKit.NSComboBoxDataSource
):
TypeError: class WordTypeManager does not implement protocol
NSComboBoxDataSource: no implementation for
comboxBox:objectValueForItemAtIndex:
I thought I was defining this function correctly -- replace `:' with `_'.
Any ideas what's going on?
Thanks in advance,
steve
--
|