[Pythonmac-SIG] More on init
Aldo Bergamini
aaberga at nb-a.com
Mon Jul 4 18:04:49 CEST 2005
An update on my fiddling:
<snippet>
from Foundation import *
from AppKit import *
from PyObjCTools import NibClassBuilder
class PySayTextAppDelegate(NibClassBuilder.AutoBaseClass):
# IB defined outlets
# textField
# speechSynthetizer
#
# IB defined actions
# sayIt_
# stopIt_
def init(self):
NSLog("init")
self.speechSynth = NSSpeechSynthetizer.alloc()
self.speechSynth.initWithVoice_(None)
return self
</snippet>
In this version the init method gets called. I did remove the attempt to
call the super class' init method.
I know that the method IS called as I get an exception on
NSSpeechSynthetizer.alloc() (hooray... ;-) : NSSpeechSynthetizer is not
defined, apparently.
An attempt to import <Cococa> failed miserably...
Any idea?
Thanks again,
Aldo
More information about the Pythonmac-SIG
mailing list