Re: devil of a time with an NSImageView
Re: devil of a time with an NSImageView
- Subject: Re: devil of a time with an NSImageView
- From: Jean-Daniel Dupas <email@hidden>
- Date: Thu, 20 Aug 2009 00:49:37 +0200
You're probably calling setImage: before the nib is loaded (and so the
outlet is connected).
You can force it to load by calling [aWindowController window] before
trying to set the image.
Le 20 août 2009 à 00:39, Jack Carbaugh a écrit :
You are correct. Logging of boxPic is indeed null.
How do i proceed then?
here is a snippet of the code ...
aWindowController *theWindowController = [[aWindowController alloc]
initWithMyName:[who name]];
// snip several assignments to theWindowController
if ( [[who serverItems] objectForKey:@"image"] )
{
[theWindowController setImages:[[who serverItems]
objectForKey:@"image"]];
}
// method
-(void)setImages:(NSImage *)newImage;
{
[newImage retain];
NSLog(@"Incoming image: %@", newImage);
[boxPic setImage:newImage];
NSLog(@"box:%@", boxPic);
[newImage release];
}
On Aug 19, 2009, at 6:11 PM, Quincey Morris wrote:
On Aug 19, 2009, at 14:31, Jack Carbaugh wrote:
100% certain it is connected in the xib.
That's not proof it's connected (yet) at the time 'setImage:' is
invoked. Log the value of 'boxPic' too, and I bet it will be nil.
_______________________________________________
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
_______________________________________________
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
_______________________________________________
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