#DOCUMENTATION by cg
class: Tools::InlineMessageDialog
comment/format in: #showProgressLabeled:while:
--- a/Tools__InlineMessageDialog.st Tue Nov 13 15:42:37 2018 +0100
+++ b/Tools__InlineMessageDialog.st Fri Nov 16 16:14:30 2018 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
Copyright (c) 2007-2010 Jan Vrany, SWING Research Group, Czech Technical University in Prague
Copyright (c) 2009-2010 eXept Software AG
@@ -886,40 +884,42 @@
When aBlock terminates (either normally or abruptly, the inline-dialog is closed).
"
- worker := [
- self reset.
- self beProgress.
- self message: aString.
- self addButtonAbort.
- self progress: nil.
- self show.
+ worker :=
[
- aBlock value.
- ] on: ProgressNotification , ActivityNotification do:[:ex|
- |status color|
-
- ex creator == ProgressNotification ifTrue:[
- status := ex statusInfo.
- status notNil ifTrue:[
- status == #error ifTrue:[
- color := Color red.
- ] ifFalse:[
- status == #warning ifTrue:[
- color := Color orange.
+ self reset.
+ self beProgress.
+ self message: aString.
+ self addButtonAbort.
+ self progress: nil.
+ self show.
+ [
+ aBlock value.
+ ] on: ProgressNotification , ActivityNotification do:[:ex|
+ |status color|
+
+ ex creator == ProgressNotification ifTrue:[
+ status := ex statusInfo.
+ status notNil ifTrue:[
+ status == #error ifTrue:[
+ color := Color red.
] ifFalse:[
- color := Color yellow.
+ status == #warning ifTrue:[
+ color := Color orange.
+ ] ifFalse:[
+ color := Color yellow.
+ ].
].
+ self progressIndicatorForegroundHolder value:color.
].
- self progressIndicatorForegroundHolder value:color.
].
- ].
- self progress: ex parameter.
- ex messageText notNil ifTrue:[
- self message: ex messageText.
+ self progress: ex parameter.
+ ex messageText notNil ifTrue:[
+ self message: ex messageText.
+ ].
+ ex proceed.
].
- ex proceed.
- ].
- ] newProcess.
+ ] newProcess.
+
worker addExitAction:[
"This check is required, since somebody may want to show
info/warning from within the action block"
@@ -931,6 +931,7 @@
worker resume.
"Created: / 11-04-2012 / 13:38:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified (format): / 16-11-2018 / 09:52:27 / Claus Gittinger"
! !
!InlineMessageDialog methodsFor:'utilities-obsolete'!