• 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: NSScrollView drawing errors (Cocoa Bug?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSScrollView drawing errors (Cocoa Bug?)


  • Subject: Re: NSScrollView drawing errors (Cocoa Bug?)
  • From: Jonathon Mah <email@hidden>
  • Date: Fri, 14 Oct 2005 00:21:13 +0930

Michael,

I think I have found the reason for the messed up drawing and I am pretty sure it's a Cocoa bug. When setting an NSScrollView's frame to values that contain decimal amounts, like so:

    [scrollView setFrame:NSMakeRect(10.5f, 10.6f, 100.2f, 100.8f)];

the scrolling and drawing are completely messed up. If you change this to the following:

    [scrollView setFrame:NSMakeRect(10.0f, 10.0f, 100.0f, 100.0f)];

drawing and scrolling work nicely and without any errors. That is the scenario at least on my machine. If somebody can confirm this I will file a bug.

This is well-known behavior of NSScrollView and friends. Filing a bug would be good, though -- even if the issue isn't fixed, it needs at least to be clearly documented in the NSScrollView class.


So you need to use integer values with the scrollview. NSIntegralRect can help out here.


Jonathon Mah email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >NSScrollView drawing errors (From: Michael Becker <email@hidden>)
 >Re: NSScrollView drawing errors (Cocoa Bug?) (From: Michael Becker <email@hidden>)

  • Prev by Date: Re: SharedFrameworks
  • Next by Date: Re: Interface Builder and Window Size Limits
  • Previous by thread: Re: NSScrollView drawing errors (Cocoa Bug?)
  • Next by thread: [ANN] Cocoabuilder archive status update
  • Index(es):
    • Date
    • Thread