• 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: split up alloc and init?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: split up alloc and init?


  • Subject: Re: split up alloc and init?
  • From: Alastair Houghton <email@hidden>
  • Date: Mon, 11 Feb 2008 17:50:38 +0000

On 11 Feb 2008, at 16:25, John Terranova wrote:

Once I call [NSInvocationOperation initWithTarget:selector:object:], then the object is set and unchangeable. I guess one option would be to learn about NSInvocation and modify the parameters in it directly.

Surely:

 [[invocationOperation invocation] setTarget:someOtherObject];

But be careful, because you wouldn't want to create a race condition.

Anyway, why not subclass NSOperation rather than NSInvocationOperation? NSInvocationOperation is really for when you have some other object and you want to trigger a method invocation on that other object. Specifying the operation object itself for the target parameter probably means you're doing the wrong thing.

Kind regards,

Alastair.

--
http://alastairs-place.net


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


References: 
 >split up alloc and init? (From: John Terranova <email@hidden>)
 >Re: split up alloc and init? (From: Scott Andrew <email@hidden>)
 >Re: split up alloc and init? (From: John Terranova <email@hidden>)

  • Prev by Date: Re: easily search Address Book for phone numbers in various formats?
  • Next by Date: Re: easily search Address Book for phone numbers in various formats?
  • Previous by thread: Re: split up alloc and init?
  • Next by thread: Re: split up alloc and init?
  • Index(es):
    • Date
    • Thread