• 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: (no subject)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (no subject)


  • Subject: Re: (no subject)
  • From: Roarke Lynch <email@hidden>
  • Date: Sat, 24 Aug 2002 03:10:44 -0400

On Friday, August 23, 2002, at 08:17 PM, Joshua D. Orr wrote:

I am trying to implement a hand which scrolls the view by dragging in the NSView.

in the mouseDown: NEView methods I have a dragging loop which reads the difference between the last and the new mouse location while dragging and then uses the ([self bounds]).origin and adds the difference point and the bounds origin and the uses [self scrollPoint:] with the new location.

This seems to sort of work, because it does scroll around, but it is kind of a little weird. It is almost like it accelerates the way you are dragging but when you go the other way it slows down then it finally starts going the other way, it is almost like it has momentum :). This is interesting but un desirable.

Does anyone have any suggestions?


I don't specifically know if this will help the performance. But there is a mouseDrag event method inherited from NSResponder. Using this method to control scrolling whilst dragging may smooth things out a bit.


Roarke Lynch
-------------------------------
email@hidden
_______________________________________________
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: 
 >(no subject) (From: "Joshua D. Orr" <email@hidden>)

  • Prev by Date: Re: [Q] Trouble setting an image in an NSOutlineView
  • Next by Date: Open default email client
  • Previous by thread: Re: (no subject)
  • Next by thread: (no subject)
  • Index(es):
    • Date
    • Thread