Re: Need help with warning: passing argument 1 of ... from distinct Objective C type
Re: Need help with warning: passing argument 1 of ... from distinct Objective C type
- Subject: Re: Need help with warning: passing argument 1 of ... from distinct Objective C type
- From: Nick Zitzmann <email@hidden>
- Date: Tue, 6 Nov 2007 11:27:19 -0700
On Nov 6, 2007, at 11:07 AM, Jason Horn wrote:
warning: passing argument 1 of 'setImage:' from distinct Objective C
type
My code is generating a CIImage and then passing it to a view object
(VideoView) for drawing. As far as I can tell, the compiler is
trying to tell me that the object (CIImage) that I am sending to the
setImage method is of the wrong type. But it looks right to me.
Does anyone know what is going wrong here?
It's possible the compiler is mismatching your call to -setImage: and
is thinking you're messaging an NSImageView or something, which takes
an NSImage. Make sure the code is importing the header of the object
that has the -setImage: method. If that still doesn't work, then you
might have to cast the receiver...
CIImage *ciImage = [CIImage alloc];
[ciImage initWithBitmapImageRep:bitmap];
Unless you really know what you're doing, you should always call
+alloc and -init on the same line.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
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