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 (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/intrntmn%40aol.com
This email sent to intrn...@aol.com
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/devlists%40shadowlab.org
This email sent to devli...@shadowlab.org
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com