[FIX] ScrollPaneEventFix

Jesse Welton jwelton at pacific.mps.ohio-state.edu
Mon Jan 22 21:19:51 UTC 2001


A tiny fix removing circular event logic from ScrollPane and
TwoWayScrollPane, which luckily can never be executed.  These classes
were mixing direct #mouseEnter: event handling with #on:send:to:
handling.  This change set simply eliminates the latter.

-Jesse
-------------- next part --------------
'From Squeak2.9alpha of 30 August 2000 [latest update: #3193] on 22 January 2001 at 4:18:03 pm'!
"Change Set:		ScrollPaneEventFix
Date:			22 January 2001
Author:			Jesse Welton

Little fix of circular circular event logic in ScrollPane and TwoWayScrollPane, due to lines

	self on: #mouseEnter send: #mouseEnter: to: self.
	self on: #mouseLeave send: #mouseLeave: to: self.

in #initialize.  These lines are extraneous because the EventHandler mechanism is invoked by
the shadowed definition of #mouseEnter: in Morph."!


!ScrollPane methodsFor: 'initialization' stamp: 'JW 1/22/2001 16:05'!
initialize
	retractableScrollBar _ (Preferences valueOfFlag: #inboardScrollbars) not.
	scrollBarOnLeft _ (Preferences valueOfFlag: #scrollBarsOnRight) not.
	super initialize.
	hasFocus _ false.
	borderWidth _ 2.
	borderColor _ Color black.

	scrollBar := ScrollBar new model: self slotName: 'scrollBar'.
	scrollBar borderWidth: 1; borderColor: Color black.

	scroller := TransformMorph new color: Color transparent.
	scroller offset: -3 at 0.
	self addMorph: scroller.

	retractableScrollBar ifFalse: [self addMorph: scrollBar].

	self extent: 150 at 120! !


!TwoWayScrollPane methodsFor: 'initialization' stamp: 'JW 1/22/2001 16:06'!
initialize
	| |
	super initialize.
	borderWidth _ 2.  borderColor _ #inset.

	yScrollBar := ScrollBar new model: self slotName: 'yScrollBar'.
	yScrollBar borderWidth: 2; borderColor: #inset.
	self addMorph: yScrollBar.

	xScrollBar := ScrollBar new model: self slotName: 'xScrollBar'.
	xScrollBar borderWidth: 2; borderColor: #inset.
	self addMorph: xScrollBar.

	scroller := TransformMorph new color: Color transparent.
	scroller offset: 0 at 0.
	self addMorph: scroller.

	self extent: 150 at 120! !



More information about the Squeak-dev mailing list