Re: All seems well but image doesn't show up.
Re: All seems well but image doesn't show up.
- Subject: Re: All seems well but image doesn't show up.
- From: David Arnold <email@hidden>
- Date: Sun, 22 Jul 2007 19:30:29 -0700
Chris et al,
Nice going Chris! Thanks.
Commenting out the code
/*
- (void)drawRect:(NSRect)rect {
// Drawing code here.
}
*/
cured the problem.
However, I am so new to this, I can't say that I "see" the problem.
I used the File Assistant to subclass an NSView class, so the
drawRect command was put there by the XCode machinery. A naive guess
would be that an empty drawRect method would cause an empty NSView,
but I cannot say for certain why the lines
- (void)windowDidLoad
{
NSImage *image = [[self document] activeImage];
NSLog(@"%@",image);
[view setImage:image];
in the IAWindowController still don't provide an image.
And finally, when we get ourselves into these situations, other than
pouring over the code again, what good ideas come to mind to debug
the source of the problem?
On 23/07/2007, at 11:37 AM, David Arnold wrote:
1. What I can do to fix the problem, and
Well, in IAImageView (your subclass of NSImageView) you've
overridden drawRect:
- (void)drawRect:(NSRect)rect {
}
Can you see the problem?
- Chris
_______________________________________________
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