Error trying to add NSImage to NSImageCell
Error trying to add NSImage to NSImageCell
- Subject: Error trying to add NSImage to NSImageCell
- From: Steven Crosley <email@hidden>
- Date: Wed, 8 Aug 2007 16:04:05 -0500
Hi,
I'm trying to add an NSImage from an Entity method that looks like this:
- (NSImage *) icon {
ABAddressBook *book = [ABAddressBook sharedAddressBook];
ABPerson *person;
person = (ABPerson *)[book recordForUniqueId:[self
primitiveValueForKey: @"addressBookUser"]];
NSImage * tmpValue;
tmpValue = [NSImage initWithData:[person imageData]];
return tmpValue;
}
Where addressBookUser is a stored attribute in my Core Data model. I
then try binding to the value with my controller key as
arrangedObjects and my Model Key Path as icon to my NSTableColumn
(I've also tried binding it to NSImageCell) but I get error messages
either way:
Binding to the NSTableColumn:
NSImageCell's object value must be an NSImage.
Binding to the NSImageCell:
NSImageCell's object value must be an NSImage.
*** Uncaught exception: <NSInvalidArgumentException> NSImageCell's
object value must be an NSImage.
Any ideas what I'm doing wrong? Thanks!
Steven
_______________________________________________
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