FROM : Nick Zitzmann
DATE : Tue Nov 06 19:27:19 2007
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/>
DATE : Tue Nov 06 19:27:19 2007
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/>
| Related mails | Author | Date |
|---|---|---|
| Jason Horn | Nov 6, 19:07 | |
| Nick Zitzmann | Nov 6, 19:27 |






Cocoa mail archive

