As others have suggested ... the NIB had not been fully loaded and ready for my changes. As a test, i modified the image view in awakeFromNib and things worked marvelously.

Thank you for the help!

I knew it had to be something simple that i was missing.

Jack

On Aug 19, 2009, at 8:37 PM, Jonathan Hess wrote:

Hey Jack -

That means that either the outlet isn't connected, or the NIB hasn't been loaded yet when setImage: is called.

Also, are you sure you aren't creating more instances of your class than you think you are? A common mistake is to instantiate the class in code, and tell it to load a NIB, but the NIB file also instantiates a second instance of the class because the File's Owner was misunderstood.

Hope that helps -
Jon Hess

On Aug 19, 2009, at 5:28 PM, Jack Carbaugh wrote:

The result is null.

On Aug 19, 2009, at 8:04 PM, Jonathan Hess wrote:

What happens if you include this log to your setImage method?

NSLog(@"image view: %@", boxPic);

Also, rather than logging you should see if you can find the time to learn to use the debugger. It's much more efficient than printf debugging.

Good Luck -
Jon Hess

On Aug 19, 2009, at 2:31 PM, Jack Carbaugh wrote:

100% certain it is connected in the xib.


On Aug 19, 2009, at 5:19 PM, Dave DeLong wrote:

Are you sure the outlet hasn't gotten disconnected? Or maybe you connected it, then changed the name of the outlet in Xcode? That's the output you would see if the outlet were null.

Dave

On Aug 19, 2009, at 3:15 PM, Jack Carbaugh wrote:

I am simply trying to set an NSImageView to an NSImage. I'm certain i'm doing the right methods, but alas, no images show.

Suggestions ?

Thanks in advance.

jack

boxPic is an IBOutlet connected to the NSImageView in the NIB.

-(void)setImage:(NSImage *)newImage;
{
NSLog(@"Incoming image: %@", newImage); // verifies that i am getting an image
[boxPic setImage:newImage];
NSLog(@"%@", [boxPic image]); // gives (null)
}
2009-08-19 17:10:42.474 ***[52934:10b] Incoming image: NSImage 0x63ca520 Name=NSUser Size={32, 32} Reps=( NSCoreUIImageRep 0x7b1adf0 Size={32, 32} ColorSpace=NSCalibratedRGBColorSpace BPS=0 Pixels=0x0 Alpha=YES drawOptions={
 imageNameKey = "image.User";
 widget = image;
}
)
2009-08-19 17:10:42.475 ***[52934:10b] (null)
_______________________________________________

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/jhess%40apple.com

This email sent to jh...@apple.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/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to