Re: Newbie thread question
Re: Newbie thread question
- Subject: Re: Newbie thread question
- From: Randall Meadows <email@hidden>
- Date: Wed, 4 Feb 2004 09:37:04 -0500
At 4:07 PM -0800 2/3/04, Dustin Voss said:
On 3 Feb, 2004, at 11:49 AM, Randall Meadows wrote:
[NSThread detachNewThreadSelector:@selector(doThreadedProcess)
toTarget:[ConverterWdw class] withObject:self];
[ConverterWdw class] returns the ConverterWdw class itself. It
returns a "Class *", not a "ConverterWdw *". The ConverterWdw class
is where class methods (such as +alloc, +initialize, or
+converterWithYadda) live. Your doThreadedProcess method is not a
class method, so you should use an instance of ConverterWdw as the
target.
Yeah, I ended up figuring that out. Actually getting the instance of
that to use as the target threw me for a loop. I ended up creating
an instance variable in my first class, and making the connection in
IB; was that the correct way to do it? I'll only have one instance
of either class, and I instantiate it in the NIB file, rather than
create them at runtime.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.