• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Pointer to id
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Pointer to id (From: Sanri Parov <email@hidden>)
 >Re: Pointer to id (From: Pontus Ilbring <email@hidden>)
 >Re: Pointer to id (From: Sanri Parov <email@hidden>)

  • Prev by Date: Re: NSPropertyListSerialization/plutil bloat in Tiger vs Jaguar
  • Next by Date: Devices accessing
  • Previous by thread: Re: Pointer to id
  • Next by thread: Re: Pointer to id
  • Index(es):
    • Date
    • Thread