FROM : Milen Dzhumerov
DATE : Wed Jul 02 19:13:53 2008
Hi all,
I've run into a something I find strange. I've got a property declared
as:
@property(readwrite, assign, nonatomic) CGImageRef image;
And it's implemented as:
-(CGImageRef)image
{
return mImage;
}
-(void)setImage:(CGImageRef)newImage
{
if(mImage != newImage)
{
CGImageRelease(mImage);
CGImageRetain(newImage);
mImage = newImage;
}
}
When I try to set it using KVC (e.g. [obj setValue:[NSValue
valueWithPointer:image] forKeyPath:@"image"]), it says [<*ClassName*
0x133050> setValue:forUndefinedKey:]: this class is not key value
coding-compliant for the key image.'
Any hints on why the class is not KVC-compliant? I've read the docs
and it seems to satisfy the bullet points listed (moreover it's even
declared as @property so the naming of the setters / getters should be
alright).
Thanks,
M
DATE : Wed Jul 02 19:13:53 2008
Hi all,
I've run into a something I find strange. I've got a property declared
as:
@property(readwrite, assign, nonatomic) CGImageRef image;
And it's implemented as:
-(CGImageRef)image
{
return mImage;
}
-(void)setImage:(CGImageRef)newImage
{
if(mImage != newImage)
{
CGImageRelease(mImage);
CGImageRetain(newImage);
mImage = newImage;
}
}
When I try to set it using KVC (e.g. [obj setValue:[NSValue
valueWithPointer:image] forKeyPath:@"image"]), it says [<*ClassName*
0x133050> setValue:forUndefinedKey:]: this class is not key value
coding-compliant for the key image.'
Any hints on why the class is not KVC-compliant? I've read the docs
and it seems to satisfy the bullet points listed (moreover it's even
declared as @property so the naming of the setters / getters should be
alright).
Thanks,
M
| Related mails | Author | Date |
|---|---|---|
| Milen Dzhumerov | Jul 2, 19:13 | |
| Alex Wait | Jul 2, 21:26 | |
| Nathan Vander Wilt | Jul 2, 22:33 | |
| Chris Suter | Jul 2, 22:34 | |
| mmalc crawford | Jul 2, 23:04 |






Cocoa mail archive

