--- a/Workspace.st Tue May 12 21:19:05 1998 +0200
+++ b/Workspace.st Sat May 16 16:48:52 1998 +0200
@@ -650,19 +650,6 @@
"Modified: / 11.1.1997 / 20:56:30 / cg"
"Modified: / 22.4.1998 / 21:56:13 / ca"
"Created: / 22.4.1998 / 21:57:05 / ca"
-!
-
-doItWithValueDo:aBlock
- "helper for doIt, printIt and inspectIt.
- Evaluate the selection and, if all went well, evaluate the argument,
- aBlock with the value.
- Most work is in preparing for proper cleanup in case of abort
- or other exception while the evaluation is performed.
- (restore cursor, selectionColors etc.)"
-
- ^ self do:(self selection) withValueDo:aBlock
-
- "Modified: / 22.4.1998 / 21:57:33 / ca"
! !
!Workspace methodsFor:'initialize / release'!
@@ -729,7 +716,11 @@
"user selected 'doIt' from menu; show a wait-cursor, evaluate the code
and finally restore cursor; return result of evaluation"
- self doItWithValueDo:[:result | ]
+ ^ self
+ do:(self selection)
+ withValueDo:[:result | ]
+
+ "Modified: / 16.5.1998 / 16:45:01 / cg"
!
editMenu
@@ -782,7 +773,11 @@
"user selected 'inspectIt' from menu; use doIt to evaluate the code
and start an inspector on the result"
- self doItWithValueDo:[:result | result inspect]
+ ^ self
+ do:(self selection)
+ withValueDo:[:result | result inspect]
+
+ "Modified: / 16.5.1998 / 16:44:56 / cg"
!
printIt
@@ -793,13 +788,15 @@
readOnly ifTrue:[
self beep
] ifFalse:[
- self doItWithValueDo:[:result |
- self cursorLine:selectionEndLine col:(selectionEndCol + 1).
- self insertSelectedStringAtCursor:(result displayString "printString")
- ]
+ self
+ do:(self selection)
+ withValueDo:[:result |
+ self cursorLine:selectionEndLine col:(selectionEndCol + 1).
+ self insertSelectedStringAtCursor:(result displayString "printString")
+ ]
]
- "Modified: 28.5.1996 / 16:59:04 / cg"
+ "Modified: / 16.5.1998 / 16:44:44 / cg"
!
spyOnIt
@@ -830,5 +827,5 @@
!Workspace class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/Workspace.st,v 1.60 1998-05-07 17:44:19 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/Workspace.st,v 1.61 1998-05-16 14:48:52 cg Exp $'
! !