bugGNUstep - Bugs: bug #22694, NSClipView is not calling...

Group
 
 

bug #22694: NSClipView is not calling adjustScroll:

Submitter:  Benhur Stein <benhur>
Submitted:  Sat 22 Mar 2008 07:14:29 PM UTC
   
 
Category:  Gui/AppKit Severity:  3 - Normal
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 17 Jun 2008 08:20:38 PM UTC, comment #5: 

Commited to SVN

Fred Kiefer <FredKiefer>
Group Member
Thu 03 Apr 2008 02:25:28 AM UTC, comment #4: 

Well, it seems that macosx does no magic...

So, my suggestion is to implement a hidden method,
say _scrollToPoint: in NSClipView as this:

- (void) _scrollToPoint: (NSPoint)aPoint
{
  NSRect proposedBounds;
  NSRect proposedVisibleRect;
  NSRect newVisibleRect;
  NSRect newBounds;

  // give documentView a chance to adjust its visible rectangle
  proposedBounds = _bounds;
  proposedBounds.origin = aPoint;
  proposedVisibleRect = [self convertRect: proposedBounds
                                   toView: _documentView];
  newVisibleRect = [_documentView adjustScroll: proposedVisibleRect];
  newBounds = [self convertRect: newVisibleRect fromView: _documentView];

  [self scrollToPoint:newBounds.origin];
}

and change calls to scrollToPoint: inside NSClipView and
NSScrollView (except the last one, that changes the header
clip view) to calls to this new method.

I tested it, and it works fine. (or at least seems to)

Benhur Stein <benhur>
Tue 01 Apr 2008 01:37:43 AM UTC, comment #3: 

It doesn't solve the problem, because autoscroll:
is only used when dragging out of a view, and adjustScroll:
should be called almost always when scrolling is done.
Apple's doc explicitly forbids to call it at the lower
methods (scrollToPoint:), where it would be easier to
implement. Apparently, to implement this we would have
to look all places where those lower methods are called.
I'll try to take a better look at how it works on macosx.

Benhur Stein <benhur>
Mon 31 Mar 2008 10:57:05 PM UTC, comment #2: 

Could you please test wether placing a call to that method insode of the autoscroll: method of NSClipView solves your problem?
If so, is a change to viewFrameChanged: still needed?

Fred Kiefer <FredKiefer>
Group Member
Sat 22 Mar 2008 07:28:47 PM UTC, comment #1: 

Sorry, the proposed correction only corrects the problem when
resizing the scrolled view, not in the general case of just scrolling it.

Benhur

Benhur Stein <benhur>
Sat 22 Mar 2008 07:14:29 PM UTC, original submission:  

NSClipView is not calling documentView's adjustScroll: when
scrolling, thus the document view cannot control its scrolling.

The attached file contains an implementation of NSClipView's
viewFrameChanged: that corrects this problem.

Benhur

Benhur Stein <benhur>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #15311:  proposedNSClipView-viewFrameChanged added by benhur (828B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by FredKiefer (Posted a comment)
  • -email is unavailable- added by benhur (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-06-17 FredKiefer StatusNone Fixed
        Open/ClosedOpen Closed
    2008-03-22 benhur Attached File- Added proposedNSClipView-viewFrameChanged, #15311

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code