On Wednesday, October 15, 2008, at 11:25AM, "Jack Jansen" <[EMAIL PROTECTED]> 
wrote:
>
>On 15 okt 2008, at 05:34, Joe Strout wrote:
>> # Now we need a NSRunLoop...
>> runLoop = NSRunLoop.alloc()  # note: no init() method?

This is definitely wrong, you must always call some kind of init method after 
calling alloc.

>> 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()

Or better yet:

    runLoop = NSRunLoop.currentRunLoop().

The difference is that mainRunLoop returns the run loop for the main thread,
currentRunLoop returns the run loop for the current thread.

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

Reply via email to