On Tue, Dec 16, 2008 at 10:49 AM, Jean-Daniel Dupas
<[email protected]> wrote:

> No. In Cocoa you never subclass NSThread. Instead of overriding start, you
> implement you own start wherever you want (and with the name you want) and
> you pass it as parameter (SEL + target).

Pre-Leopard that we true, as of Leopard NSThread was enhanced to also
support subclassing (if you find the need to do so).

"Prior to Mac OS X v10.5, the only way to start a new thread is to use
the detachNewThreadSelector:toTarget:withObject: method. In Mac OS X
v10.5 and later, you can create instances of NSThread and start them
at a later time using the start method.
...
In Mac OS X v10.5 and later, you can subclass NSThread and override
the main method to implement your thread's main entry point. If you
override main, you do not need to invoke the inherited behavior by
calling super."

-Shawn
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to