--- a/Workspace.st Fri May 07 18:10:20 2010 +0200
+++ b/Workspace.st Mon May 17 11:50:28 2010 +0200
@@ -1180,7 +1180,7 @@
or other exception while the evaluation is performed.
(restore cursor, selectionColors etc.)"
- |selLine selCol endLine endCol cLine cCol cleanUp|
+ |selLine selCol endLine endCol cLine cCol cleanUp executeBlock|
code notNil ifTrue:[
code asString withoutSeparators isEmpty ifTrue:[ ^ self ].
@@ -1215,27 +1215,36 @@
otherwise, we could keep lots of garbage from being freed
until the view gets closed
"
- self topView withExecuteCursorDo:[
- [
- AbortOperationRequest handle:[:ex |
- "/ aBlock value:'** Abortsignal cought **'.
- ex return
- ] do:[
- |value|
+ executeBlock := [
+ [
+ AbortOperationRequest handle:[:ex |
+ "/ aBlock value:'** Abortsignal cought **'.
+ ex return
+ ] do:[
+ |value|
- doItAction notNil ifTrue:[
- value := doItAction value:(code asString).
- cleanUp value. cleanUp := nil.
- aBlock value:value.
- value := nil.
- self class rememberDoIt:code.
+ doItAction notNil ifTrue:[
+ value := doItAction value:(code asString).
+ cleanUp value. cleanUp := nil.
+ aBlock notNil ifTrue:[
+ aBlock value:value.
+ ].
+ value := nil.
+ self class rememberDoIt:code.
+ ]
]
+ ] ensure:[
+ cleanUp notNil ifTrue:[
+ cleanUp value. cleanUp := nil
+ ].
]
- ] ensure:[
- cleanUp notNil ifTrue:[
- cleanUp value. cleanUp := nil
- ].
- ]
+ ].
+ aBlock isNil ifTrue:[
+ "no action is performed with the result - give the user a visible
+ feedback, that something has been done"
+ self topView withVisibleCursor:Cursor execute do:executeBlock.
+ ] ifFalse:[
+ self topView withCursor:Cursor execute do:executeBlock.
].
]
@@ -1486,7 +1495,7 @@
^ self
do:(self selectionOrTextOfCursorLine)
- withValueDo:[:result | ]
+ withValueDo:nil
"Modified: / 16.5.1998 / 16:45:01 / cg"
!
@@ -1680,7 +1689,7 @@
|code|
code := 'MessageTally spyDetailOn:[' , self selectionAsString, ']'.
- self do:code withValueDo:[:result | ]
+ self do:code withValueDo:[:value| ].
"Modified: / 22-04-1998 / 22:03:53 / ca"
"Modified: / 08-11-2007 / 11:36:38 / cg"
@@ -1693,9 +1702,8 @@
|code|
code := '|t| t := Time millisecondsToRun:[' , self selectionAsString, '].
-
- Transcript showCR:''execution time: '' , t printString , '' ms''.'.
- self do:code withValueDo:[:result | ]
+ Transcript showCR:''execution time: '' , t printString , '' ms''.'.
+ self do:code withValueDo:[:value | ].
"Modified: / 22.4.1998 / 22:03:51 / ca"
! !
@@ -1784,9 +1792,9 @@
!Workspace class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/Workspace.st,v 1.215 2010-05-07 16:10:20 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/Workspace.st,v 1.216 2010-05-17 09:50:28 stefan Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libwidg/Workspace.st,v 1.215 2010-05-07 16:10:20 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/Workspace.st,v 1.216 2010-05-17 09:50:28 stefan Exp $'
! !