[BUG] TextMorph: subscript out of bounds

RossBoylan at stanfordalumni.org RossBoylan at stanfordalumni.org
Wed Oct 10 05:14:47 UTC 2001


Since filing in the latest changes, I get errors popping up at me when I
move my mouse over some morphs that inherit from TextMorph: "subscript
is out of bounds: 0".  I'm a little surprised to see it doing much of
anything on mouse over, and am hoping for some help on this.

Some possibly relevant information:

The morph is inside a TwoWayScrollPane and the event coordinates are a
bit wild: 157 at 57980.0.  I wonder if some coordinate translation is not
being handled properly.

I had not filed in for awhile (a few weeks?) so I picked up changes from
the end of 3.1 as well as 3.2.

TextMorph>>enterClickableRegion has a non-nil paragraph

CharacterBlockScanner>>characterBlockAtPoint:index:in:
fails most of the way down in 

	done  _ false.
	[done] whileFalse:
		[stopCondition _ self scanCharactersFrom: lastIndex to: runStopIndex
			in: text string rightX: characterPoint x
			stopConditions: stopConditions kern: kern.
		"see setStopConditions for stopping conditions for character block 
operations."
		self lastCharacterExtentSetX: (specialWidth == nil
			ifTrue: [font widthOf: (text at: lastIndex)]

lastIndex is 0, which leads to the subscript error.  This is peculiar,
because the only assignment to lastIndex, at the start of the method,
makes it 1 according to the current debugger state.

Also peculiar is the fact that the object instance variables (bottom
left of debugger) do not appear by name; instead there are numbers where
the names usually are.  The only two words are self and 'all instance
variables'.  If I click on the latter I see the variables with names. 
Perhaps this is an artifact of being inside an inlined whileFalse:
block?

I do not believe my TextMorph subclass is doing anything relevant to the
problem (famous last words). I have made no changes to it between the
time things were working and now.

Image version: Squeak3.2alpha
latest update: #4418
Current Change Set: Activity

VM version: Squeak3.0 of 4 February 2001 [latest update: #3446]
for: unix

Receiver: a RBUpdatingTextMorph(3049)

Instance variables: 
bounds: 	4 at 57976 corner: 254 at 57992
owner: 	an ActivityLogEntryMorph(2454)
submorphs: 	#()
fullBounds: 	4 at 57976 corner: 254 at 57992
color: 	Color black
extension: 	a MorphExtension (1919)
borderWidth: 	0
borderColor: 	Color black
textStyle: 	a TextStyle NewYork10
text: 	a Text for 'homework and misc'
wrapFlag: 	true
paragraph: 	a NewParagraph
editor: 	nil
container: 	nil
predecessor: 	nil
successor: 	nil
lastGesture: 	nil
backgroundColor: 	nil
margins: 	nil
myStop: 	false
myEditorStop: 	false
target: 	an ActivityLogEntry
getSelector: 	#comment
putSelector: 	#comment:

Method (temp) variables: 
anEvent: 	[143 at 57962.0 157 at 57980.0 mouseMove 15755022]

Stack: 
String(Object)>>error:
String(Object)>>errorSubscriptBounds:
String(Object)>>at:
String>>at:
Text>>at:
CharacterBlockScanner>>characterBlockAtPoint:index:in:
NewParagraph>>characterBlockAtPoint:
RBUpdatingTextMorph(TextMorph)>>enterClickableRegion:
RBUpdatingTextMorph(TextMorph)>>mouseMove:
RBUpdatingTextMorph(TextMorph)>>handleMouseMove:
MouseMoveEvent>>sentTo:
RBUpdatingTextMorph(Morph)>>handleEvent:
MorphicEventDispatcher>>dispatchDefault:with:
MorphicEventDispatcher>>dispatchEvent:with:
RBUpdatingTextMorph(Morph)>>processEvent:using:
MorphicEventDispatcher>>dispatchDefault:with:
MorphicEventDispatcher>>dispatchEvent:with:
ActivityLogEntryMorph(Morph)>>processEvent:using:
MorphicEventDispatcher>>dispatchDefault:with:
MorphicEventDispatcher>>dispatchEvent:with:




More information about the Squeak-dev mailing list