Hey guys,
I am simply trying to display an image and can't figure out the issue.
In my appController.m
In the Person.m file.
So... I've been trying to solve this one for awhile now. Just can't do it. The log shows the following.
2007-07-02 23:32:31.183 ImageApp[869] Image Size
X:128.000000
Y:192.000000
2007-07-02 23:32:31.184 ImageApp[869] Can't cache image
It appears the image is there as it shows the dimensions.
I am simply trying to display an image and can't figure out the issue.
In my appController.m
Code:
person = [personController objectAtIndex:x];
NSImage *portrait = [[NSImage alloc] init];
portrait = [person valueForKey:@"portrait"];
NSSize size = [portrait size]; // testing purposes
NSLog(@"Image Size \n X:%f\n Y:%f", size.width, size.height);
[imageView setImage:portrait];
[imageView setNeedsDisplay:YES];
In the Person.m file.
Code:
- (void)setPortrait:(NSImage *)newImage
{
[newImage retain];
[portrait release];
portrait = newImage;
}
- (NSImage *)portrait
{
return portrait;
}
So... I've been trying to solve this one for awhile now. Just can't do it. The log shows the following.
2007-07-02 23:32:31.183 ImageApp[869] Image Size
X:128.000000
Y:192.000000
2007-07-02 23:32:31.184 ImageApp[869] Can't cache image
It appears the image is there as it shows the dimensions.