Re: split up alloc and init?
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