• 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 problems in Tiger
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSScrollView problems in Tiger


  • Subject: Re: NSScrollView problems in Tiger
  • From: Alastair Houghton <email@hidden>
  • Date: Fri, 27 May 2005 18:11:10 +0100

On 27 May 2005, at 15:51, John Nairn wrote:

I posted two vague questions before and no one had comments. I think I have more detail now.

When the bounds of the documentViewRect in an NSClipView get small, scrolling breaks down in Tiger. The problem did not occur in Panther.

I did some tests and when the view units per pixel got less than about 0.0025 (or width of bounds about 1 for a view with a frame width of 400 pixels) the problems start to occur.

[snip]

Is this a known bug? Is there a work around?

I am plotting scientific data and sometimes the natural units are very small. Since the plot may consist of over 1,000,000 Bezier curves, I hope the work around is not to scale them all before plotting. It does not bode well for using Tiger for scientific calculations in nanotechnology?

I've certainly seen similar problems, although mainly when co- ordinates become very large. The problem is that the float data type isn't precise enough for some uses, which causes redraw problems.
In the most recent program where I encountered this problem, I wrote my own scrolling implementation to counter the problem... it isn't too hard to do (although as always with scrolling, it can be a little fiddly to get it just right), using NSView's -scrollRect:by: method. This lets you handle the co-ordinate transform manually (so you can use a more precise type).


If you go this way, you need to override some of the NSResponder function associated with scrolling (e.g. -scrollLineDown:, - scrollWheel:). You'll also need to attach scroll bars to your view and point their action outlet at the view so you can implement the scrolling.

I don't know if anyone else has found a better way?

Kind regards,

Alastair.

--
http://www.alastairs-place.net


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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 problems in Tiger (From: John Nairn <email@hidden>)

  • Prev by Date: NSOpenGLView - white line artifact
  • Next by Date: Re: NSScrollView problems in Tiger
  • Previous by thread: Re: NSScrollView problems in Tiger
  • Next by thread: NSLayoutManager looping with custom NSTextContainer
  • Index(es):
    • Date
    • Thread