--- a/Scroller.st Wed May 11 16:30:47 2005 +0200
+++ b/Scroller.st Wed May 11 17:09:24 2005 +0200
@@ -1001,9 +1001,13 @@
!
installRepeat:repeatDelay
- repeatBlock notNil ifTrue:[
+ |repeatBlockCopy|
+
+ "protect against races"
+ repeatBlockCopy := repeatBlock.
+ repeatBlockCopy notNil ifTrue:[
self repairDamage.
- Processor addTimedBlock:repeatBlock afterSeconds:repeatDelay
+ Processor addTimedBlock:repeatBlockCopy afterSeconds:repeatDelay
]
!
@@ -1482,7 +1486,6 @@
].
repeatBlock := [self sensor pushUserEvent:#repeatPageUp for:self].
sensor pushUserEvent:#installRepeat: for:self withArgument:initialRepeatDelay.
- "/ Processor addTimedBlock:repeatBlock afterSeconds:initialRepeatDelay
]
] ifFalse:[
(curr > limit2) ifTrue:[
@@ -1494,7 +1497,6 @@
].
repeatBlock := [self sensor pushUserEvent:#repeatPageDown for:self].
sensor pushUserEvent:#installRepeat: for:self withArgument:initialRepeatDelay.
- "/ Processor addTimedBlock:repeatBlock afterSeconds:initialRepeatDelay
]
] ifFalse:[
pressOffset := curr - limit1.
@@ -2647,5 +2649,5 @@
!Scroller class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/Scroller.st,v 1.181 2005-05-11 14:30:47 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/Scroller.st,v 1.182 2005-05-11 15:09:24 stefan Exp $'
! !