-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NoodleLineNumberView and Lion #1
Comments
I'll see if I can wrangle some time to take a look at this but the way you make it sound seems like a Lion bug. Are you able to replicate this using the sample app? |
Mr Noodle, Thanks for the magical line numbers. Lots of people thanked me and I just The key to getting Apple's help with this issue is to construct a minimal example. I
This will unzip into two folders, "Line View Test" and "Line View Test 1". The first is the sample code on the Noodle site. I had to change the Noodle files in it The second file contains a default NSDocument project built with XCode 4.1. If you have time, you might glance through this example and see if anything pops out. (If possible, I'll try to simplify things so a more or less default NSRuler Dick Koch On Jul 28, 2011, at 9:27 AM, MrNoodle wrote:
|
Mr. Noodle, I think I have the definitive example and intend to send a bug report My example is essentially "Line View Test 1" that I sent you earlier. However, I'm going to send Apple two examples, one with NoodleLineNumberView so they To repeat a key discovery from my previous mail, this bug only exhibits itself in NewRulerView.h: #import <Cocoa/Cocoa.h> @interface NewRulerView : NSRulerView NewRulerView.m #import "NewRulerView.h" @implementation NewRulerView
} Dick Koch |
Mr. Noodle, The zip file
contains the three examples I sent to Apple and the text of the problem Dick Koch |
Any solution for this bug ? |
Marcio, I believe the bug is fixed in the next release of OS X. In addition, there is a workaround for the bug in TeXShop 3.04 and later, Unfortunately, I have a meeting shortly. But when I get back in four hours, Here's the rough idea of the workaround:
When the window resizes, the line numbers correctly draw. That is the This patch works well, but I'm looking forward to the day when it can be removed. Dick Koch On Sep 27, 2011, at 8:01 PM, Marcio Castilho wrote:
|
Marcio, Apologies for the delay. On Sep 27, 2011, at 8:01 PM, Marcio Castilho wrote:
I believe this will be fixed in system 10.7.2. In the meantime, Yusuke Terada provided a workaround for the problem on TeXShop. The idea of this patch is that when a NoodleLineNumberView is resized, the clip rect is correctly This resizing will trigger yet another drawing, but then the visible Rect won't change, so we Here is the patch in detail. TeXShop has a NoodleLineNumberView for each open document, a) In the NSDocument header
b) In the NSDocument code // FIX RULER SCROL
} c) In the NoodleLineNumberView header instance variables
TSDocument *_document; d) In the NoodleLineNumberView header methods
e) In the NoodleLineNumberView code
f) In the NoodleLineNumberView code for drawHashMarksAndLabelsInRect
// FIX RULER SCROLL
|
TeXShop uses NoodleLineNumberView. On Lion, line numbers do not scroll when text content scrolls using overlay scrollers. They do scroll with legacy scrollers. Strangely, line numbers scroll in full screen mode with overlay scrollers. Line numbers correctly appear when a window is opened, and correctly update when a window is resized.
Debugging shows that drawHashMarksAndLabelsInRect is called during scrolling, and tries to draw correct line numbers. It appears that the cliprect is incorrectly set in NSRulerView. Indeed, I can see a small sliver at the bottom of the line number rectangle, about two millimeters high, being correctly written.
This might be incorrect code in TeXShop, but the amount of code I had to add to get line numbers was minuscule. (Thanks for that!)
The text was updated successfully, but these errors were encountered: