• 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
Re: Adding NSLog() changes behavior
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Adding NSLog() changes behavior (From: Michael Becker <email@hidden>)

  • Prev by Date: Re: Adding NSLog() changes behavior
  • Next by Date: UTC->NSDate in Cocoa.Needs to be localized depending on the locale.
  • Previous by thread: Re: Adding NSLog() changes behavior
  • Next by thread: Re: Adding NSLog() changes behavior
  • Index(es):
    • Date
    • Thread