On Tue, Dec 16, 2008 at 9:29 AM, Brad O'Hearne
<[email protected]> wrote:
> Hello,
>
> I am trying to create an NSThread subclass which completely wraps the
> desired behavior of the thread execution.

I am sorry but what you described isn't making sense to me so I really
don't know how to answer your question. Can you restate it?

> As you can see, the initWithTarget: param is set to self, but the purpose of 
> that statement is to set
> self, and self isn't defined yet to my knowledge

Inside of any instance method "self" exists (hidden parameter to the
method call) and points to the instance that received the message. In
"init" methods you do the self = [super initXxxx]; to deal with the
super implementation possibly swapping the original instance out for
another instance (see Cocoa does on initializers).

If you sub-class NSThread you override -main to provide the
implementation for the code that will run in the thread context. I am
not sure why you want/think you need to override -start.

-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