bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] NSScroller event handling, part deux.


From: Michael Hanni
Subject: Re: [PATCH] NSScroller event handling, part deux.
Date: Mon, 7 Apr 2003 11:08:51 -0700 (PDT)

Hi Adam,

--- Adam Fedor <fedor@doc.com> wrote:
> 
> Looks decent to me, although it doesn't appear the 'offset' is set the 
> first time through the loop, and it's used without being set.

"offset" gets set right off the bat in trackKnob: I believe. The relevant code:

  point = [self convertPoint: [theEvent locationInWindow] fromView: nil];
  if (_isHorizontal)
    {
      lastPosition = NSMidX(knobRect);
      offset = lastPosition - point.x;
    }
  else
    {
      lastPosition = NSMidY(knobRect);
      offset = lastPosition - point.y;
    }

I'm guessing this is the offset between where we actually clicked down in the
knob cell and where the actual center of the knob is? Which, in the perfect
world, shouldn't change unless we use a modifier key... Yes, I think this only
relates to the modifier events.

I just noticed there is another useless NSPoint computed -- "aPoint" -- so I'll
modify that as well.

> I think you have write privileges, perhaps you can just put this in?

I'll get my ssh2 keys in order and give it a try.

Cheers,

Michael




reply via email to

[Prev in Thread] Current Thread [Next in Thread]