[FIX][hack]NewParagraph problem

Torge Husfeldt thu at informatik.uni-kiel.de
Thu Apr 4 13:26:19 UTC 2002


Hi Joseph,
As you can see from the subject line this is not really a fix to the
problem you stated a while ago.
This is just aimed at making the symptoms disappear. It doesn't bring us
any nearer to a real solution. There is one thing zou can do to
investigate further: you can activate the conditional halt in
#positionWhenComposed and then poke around in the debugger a bit. If we
can't find a hint in your code or make it go away by trying different
VMs/images, somebody who can reproduce this might have to dig deeper
into this.
If the variable really gets nilled out outside the smalltlalk code that
"officially" affects it then a debugger or tracer might be needed (I'm
thinking of a modified MethodTracer that logs the value of this variable
here).

HTH
Torge
-------------- next part --------------
'From Squeak3.2alpha of 1 November 2001 [latest update: #4646] on 4 April 2002 at 2:02:14 pm'!

!NewParagraph methodsFor: 'display' stamp: 'th 4/4/2002 13:56'!
displayOn: aCanvas using: displayScanner at: somePosition
	"Send all visible lines to the displayScanner for display"
	| visibleRectangle offset leftInRun line |
	visibleRectangle _ aCanvas clipRect.
	offset _ somePosition - self positionWhenComposed.
	leftInRun _ 0.
	(self lineIndexForPoint: visibleRectangle topLeft)
		to: (self lineIndexForPoint: visibleRectangle bottomRight)
		do: [:i | line _ lines at: i.
			self displaySelectionInLine: line on: aCanvas.
			line first <= line last ifTrue:
				[leftInRun _ displayScanner displayLine: line
								offset: offset leftInRun: leftInRun]].
! !

!NewParagraph methodsFor: 'private' stamp: 'th 4/4/2002 14:00'!
positionWhenComposed
	"This is a dirty hack to prevent a bug that nils out this variable to cause a walkback"
	"Just fill the variable with some old Point value that might work"
	positionWhenComposed ifNil: [
		false ifTrue:[self halt].
		^ positionWhenComposed _ container topLeft].
	^positionWhenComposed! !


!TextOnCurve methodsFor: 'as yet unclassified' stamp: 'th 4/4/2002 13:58'!
moveBy: delta
	positionWhenComposed _ self positionWhenComposed + delta.
	container _ container translateBy: delta! !



More information about the Squeak-dev mailing list