Hello List,I just came across a strange thing with initializing an NSInvocationOperation object that I wanted to share and see if this is a bug in either the docs or the framework:
I had this
NSInvocationOperation *theOp = [[NSInvocationOperation alloc]
initWithTarget:self
selector:@selector(func1:)
object:nil];
func1 is a parameter-less method of self. The docs state that
selector: can either have 0 or 1 parameters, in case of 0 object has
to be nil. That's the case. However, the initialization always failed
and theOp was nil when after the call. I had a feeling something
wasn't right and tried this:
NSInvocationOperation *theOp = [[NSInvocationOperation alloc]
initWithTarget:self
selector:@selector(func2:)
object:anObject];
func2 had 1 parameter (type id). Voila, it worked.
The question is, was this my fault?
Regards
Markus
--
__________________________________________
Markus Spoettl
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Cocoa-dev mailing list ([email protected]) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
