On 15 okt 2008, at 05:34, Joe Strout wrote:
# Now we need a NSRunLoop...
runLoop = NSRunLoop.alloc()  # note: no init() method?
runLoop.run()

I think allocating a runloop is hardly ever what you need: there's one already, and you want to get that:

  runLoop = NSRunLoop.mainRunLoop()

This indeed brings up the speech listener window-let (Can't test it, no microphone right now).

This is a paradigm you'll come across often in Cocoa: there's a lot of objects of which there is one instance per application, and there's a class method to get that instance. NSApplication, NSFontManager, NSNotificationCentre, too many to mention, really.


--
Jack Jansen, <[EMAIL PROTECTED]>, http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma Goldman


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

Reply via email to