On Jul 4, 2005, at 6:23 AM, Jacob Kaplan-Moss wrote: > Aldo -- > > PyObjC classes (that is, Python classes that extend ObjC ones, like > you're trying there) don't use the standard __init__ mechanism (at > least, not in a useful way). They do use the standard alloc/init > mechanism from ObjC, so you're on the right track in your last try: > > >> def init(self): >> super.init(self) >> NSLog("init") >> self.speechSynth = NSSpeechSynthetizer.alloc >> ().initWithVoice_(nil) >> > > The only think you're missing is a "return self" -- ObjC init methods > always return self, so you have to do the same from PyObjC.
def init(self): self = super(PySayTextAppDelegate, self).init() .... return self Also, READ THE DOCS and examples please, this is most definitely covered a thousand times :) -bob _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig