1137 ifTrue: [ActiveHelp startFor: self] |
1147 ifTrue: [ActiveHelp startFor: self] |
1138 ifFalse: [ActiveHelp stopFor: self. self updateInfoLabel] |
1148 ifFalse: [ActiveHelp stopFor: self. self updateInfoLabel] |
1139 ! |
1149 ! |
1140 |
1150 |
1141 showHelp:aHelpText for:view |
1151 showHelp:aHelpText for:view |
1142 "displays aHelpText in the info label or if present detours it to its masterApplication" |
1152 "displays aHelpText in the info label or if present detours it to its masterApplication. |
|
1153 Here, an event is pushed for myself to synchronize the helpDisplay |
|
1154 with event handling." |
|
1155 |
|
1156 |wg mySensor| |
1143 |
1157 |
1144 self showHelp ifFalse: [^true]. |
1158 self showHelp ifFalse: [^true]. |
1145 masterApplication notNil ifTrue: [masterApplication showHelp: aHelpText for:view]. |
1159 masterApplication notNil ifTrue: [masterApplication showHelp: aHelpText for:view]. |
1146 aHelpText isNil |
1160 |
1147 ifTrue: [self updateInfoLabel] |
1161 "/ OLD: show it right here ... |
1148 ifFalse: [self valueOfInfoLabel value: (aHelpText asString printString readStream through: $.)]. |
1162 "/ aHelpText isNil |
|
1163 "/ ifTrue: [self updateInfoLabel] |
|
1164 "/ ifFalse: [self valueOfInfoLabel value: (aHelpText asString printString readStream through: $.)]. |
|
1165 "/ the nil-tests should not be req'd - but thats a last-minute |
|
1166 "/ change and I dont want to breaks the delivery ... |
|
1167 |
|
1168 "/ NEW: push it into the event queue, to have it displayed |
|
1169 "/ syncronously with other events. |
|
1170 "/ (also any errors are reported as occurring in my context; |
|
1171 "/ instead of occurring in the activeHelp context). |
|
1172 |
|
1173 (wg := self windowGroup) notNil ifTrue:[ |
|
1174 mySensor := wg sensor. |
|
1175 mySensor notNil ifTrue:[ |
|
1176 mySensor flushEventsFor:self withType:#doShowHelp:. |
|
1177 mySensor pushUserEvent:#doShowHelp: for:self withArguments:(Array with:aHelpText). |
|
1178 ]. |
|
1179 ]. |
|
1180 |
1149 ^true |
1181 ^true |
|
1182 |
|
1183 "Modified: / 20.6.1998 / 16:47:37 / cg" |
1150 ! |
1184 ! |
1151 |
1185 |
1152 updateInfoLabel |
1186 updateInfoLabel |
1153 "updates the info label at the bottom" |
1187 "updates the info label at the bottom" |
1154 |
1188 |