Re: Pointer to id
Re: Pointer to id
- Subject: Re: Pointer to id
- From: Bill Bumgarner <email@hidden>
- Date: Mon, 2 Jan 2006 08:23:58 -0800
On Jan 2, 2006, at 3:08 AM, Sanri Parov wrote:
mmmhhhh.....
I've tried doing this:
NSValue *value;
value = [NSValue valueWithPointer:@encode(PortAudioStream *)];
[value retain];
[NSThread detachNewThreadSelector: @selector(playForSure:)
toTarget: nil withObject:value];
(1) Don't use @encode(). valueWithPointer: just takes a raw
pointer; it needs no information about what it is a pointing to.
(2) You are passing nil as the target for invocation of -playForSure:
in the detached thread. This effectively does absolutely nothing as
there is no way for NSThread to know whose -playForSure: method
should be invoked.
If -playForSure: is implemented on self, then pass self as the target.
b.bum
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden