Re: Adding NSLog() changes behavior
Re: Adding NSLog() changes behavior
- Subject: Re: Adding NSLog() changes behavior
- From: "M. Uli Kusterer" <email@hidden>
- Date: Tue, 16 Mar 2004 15:22:12 +0100
At 14:56 Uhr +0100 16.03.2004, Michael Becker wrote:
- (void)setImage:(NSImage*)newImage {
if ( image ) [image release];
image = [newImage retain];
mouseDragging = NO;
[ self setFrameSize:[image size]];
NSLog(@"%@", image);
[ self display];
}
I think you might need to [self setNeedsDisplay:YES] to actually mark
your view as in need of redraw. If your view can also become smaller,
you may also want to [[self superview] setNeedsDisplayInRect: [self
frame]] (or was that bounds?) to cause a redraw of the uncovered area.
Just a guess, though. I'd also not call [self display] directly and
just let the event loop take care of that, if you can.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.