--- a/ActiveHelp.st Wed Oct 16 16:11:40 2019 +0200
+++ b/ActiveHelp.st Thu Oct 17 15:44:08 2019 +0200
@@ -17,8 +17,9 @@
EventListener subclass:#ActiveHelp
instanceVariableNames:'lastHelpText listeningForAll applicationsOrTopViewsWithHelp
- lastHelpWidget lastPointerPosition pointerPositionAtShowTime'
- classVariableNames:'Debugging DebuggingEvents DebuggingHelpText'
+ lastHelpWidget lastPointerPosition pointerPositionAtShowTime
+ suspended'
+ classVariableNames:'Debugging DebuggingEvents DebuggingHelpText Suspended'
poolDictionaries:''
category:'Interface-Help'
!
@@ -342,6 +343,22 @@
"Modified (comment): / 27-02-2019 / 15:56:17 / Claus Gittinger"
!
+isSuspended
+ ^ Suspended ? false
+
+!
+
+resume
+ "resume activeHelp (eg. after doing a showMeHowItWorks)"
+
+ Suspended := false.
+
+ "
+ ActiveHelp resume
+ FlyByHelp resume
+ "
+!
+
start
"start activeHelp for all apps"
@@ -400,6 +417,17 @@
"Modified: / 26.10.1997 / 23:12:55 / cg"
"Created: / 26.10.1997 / 23:18:41 / cg"
+!
+
+suspend
+ "suspend activeHelp (eg. before doing a showMeHowItWorks)"
+
+ Suspended := true.
+
+ "
+ ActiveHelp suspend
+ FlyByHelp suspend
+ "
! !
!ActiveHelp class methodsFor:'times'!
@@ -445,9 +473,7 @@
"/ DebuggingEvents := true
"/ DebuggingEvents := false
DebuggingEvents == true ifTrue:[
- ('%1: Motion view:%2'
- bindWith:self className
- with:aView) infoPrintCR.
+ ('%1: Motion view:%2' bindWith:self className with:aView) infoPrintCR.
].
"/ Debugging := true
buttonAndModifierState == 0 ifTrue:[
@@ -493,6 +519,8 @@
^ self
].
+ self class isSuspended ifTrue:[^ self].
+
"/ if there is a sensor, let the view do it itself (in its process)
(self targetViewInitiatesHelpViaSensor
and:[ (sensor := aView sensor) notNil ])