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.

Hope that helps,

Jacob
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to