• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
All seems well but image doesn't show up.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

All seems well but image doesn't show up.


  • Subject: All seems well but image doesn't show up.
  • From: David Arnold <email@hidden>
  • Date: Sun, 22 Jul 2007 18:37:10 -0700

All,

I've tried to closely follow Mike Beam's "Working With Bitmap Images; Document-Based Application Redux" at:

http://www.macdevcenter.com/pub/a/mac/2002/04/19/cocoa.html?page=1

Working with the latest version of Tiger and XCode.

My work is here (careful, 1.7 MB):

http://online.redwoods.edu/instruct/darnold/cocoa/ImageApp.zip

Everything seems to be working as it should (as far as I can tell). When I build and run ImageApp from XCode, I get no window, but I do get a menu. From the open menu, I select a jpeg image on my system and the code seems to find it, but the image doesn't show in my NSImageView.

In my IAWindowController, I have:

@implementation IAWindowController

- (void)windowDidLoad
{
	NSImage *image = [[self document] activeImage];
	NSLog(@"%@",image);
	[view setImage:image];


And the result of that NSLog is the message:

[Session started at 2007-07-22 18:32:59 -0700.]
2007-07-22 18:33:08.077 ImageApp[3767] NSImage 0x37df90 Size={385, 410} Reps=(
NSBitmapImageRep 0x37e920 Size={385, 410} ColorSpace=NSCalibratedRGBColorSpace BPS=8 BPP=24 Pixels=385x410 Alpha=NO Planar=NO Format=0
)


However, the next line

	[view setImage:image];

just won't display the image in my NSImageView.

I've been working on this since yesterday, but I am seriously stuck at this point. Two things would be helpful:

1. What I can do to fix the problem, and

2. Here is an opportunity to use the debugger (I imagine) to track down the source of difficulty. The file compiles and runs, but the image doesn't show up. Does anyone have any good tips on how to debug a situation like this to try and figure out what is going wrong?

Thanks.


_______________________________________________

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


  • Follow-Ups:
    • Re: All seems well but image doesn't show up.
      • From: Chris Suter <email@hidden>
    • Re: All seems well but image doesn't show up.
      • From: "I. Savant" <email@hidden>
  • Prev by Date: Re: detecting mouse movement when window is inactive
  • Next by Date: Re: All seems well but image doesn't show up.
  • Previous by thread: Re: Comparing NSDictionary woes
  • Next by thread: Re: All seems well but image doesn't show up.
  • Index(es):
    • Date
    • Thread