[Biococoa-dev] strider and gck format

Koen van der Drift kvddrift at earthlink.net
Sat Mar 25 23:06:53 EST 2006


On Mar 25, 2006, at 10:35 AM, Alexander Griekspoor wrote:

> - (NSRect)lineFragmentRectForProposedRect:(NSRect)proposedRect
>         sweepDirection:(NSLineSweepDirection)sweepDirection
>         movementDirection:(NSLineMovementDirection)movementDirection
>         remainingRect:(NSRect *)remainingRect
> {
> 	// create space for the linenumber margin
> 	if(proposedRect.origin.x <= 0.0)
> 		proposedRect.origin.x = kLEFT_MARGIN_WIDTH;
> 	
> 	// set the width of a column of text
> 	proposedRect.size.width = columnWidth;
> 	
> 	// make sure we nicely break after a full column
>     if (proposedRect.origin.x + 2 * columnWidth - 20.0 >= [self  
> containerSize].width) *remainingRect = NSZeroRect;
>     else {
>         remainingRect->origin.x = proposedRect.origin.x +  
> columnWidth - 10.0;
>         remainingRect->origin.y = proposedRect.origin.y;
>         remainingRect->size.width = [self containerSize].width -  
> proposedRect.origin.x  + columnWidth - 10.0;
>         remainingRect->size.height = proposedRect.size.height;
>     }
> 	
>     return proposedRect;
> }
>


More people seem to have had problems with that code, see http:// 
www.cocoabuilder.com/archive/message/cocoa/2003/5/1/4403 (hmm, that  
code looks very familiar ;-) It was even suggested it is a system  
bug, but that was posted 3 years ago, so I would expect it to be  
fixed already.

- Koen.



More information about the Biococoa-dev mailing list