Workspace.st
changeset 257 605e68c1223f
parent 237 5c828a70dffd
child 365 cb7a40a691f3
--- a/Workspace.st	Thu Dec 14 21:17:30 1995 +0100
+++ b/Workspace.st	Thu Dec 14 21:18:44 1995 +0100
@@ -11,10 +11,10 @@
 "
 
 TextCollector subclass:#Workspace
-	 instanceVariableNames:'doItAction codeStartPosition errorFgColor errorBgColor'
-	 classVariableNames:'DefaultErrorForegroundColor DefaultErrorBackgroundColor'
-	 poolDictionaries:''
-	 category:'Interface-Workspace'
+	instanceVariableNames:'doItAction codeStartPosition errorFgColor errorBgColor'
+	classVariableNames:'DefaultErrorForegroundColor DefaultErrorBackgroundColor'
+	poolDictionaries:''
+	category:'Interface-Workspace'
 !
 
 !Workspace class methodsFor:'documentation'!
@@ -388,53 +388,55 @@
 
     code := self selection.
     code notNil ifTrue:[
-	codeStartPosition := self characterPositionOfSelection.
+        codeStartPosition := self characterPositionOfSelection.
 
-	"
-	 remember selection for later - if there is an error,
-	 the notification method will highlight it.
-	 thus destroying the current selection
-	"
-	selLine := selectionStartLine.
-	selCol := selectionStartCol.
-	endLine := selectionEndLine.
-	endCol := selectionEndCol.
-	cCol := cursorCol.
-	cLine := cursorLine.
+        "
+         remember selection for later - if there is an error,
+         the notification method will highlight it.
+         thus destroying the current selection
+        "
+        selLine := selectionStartLine.
+        selCol := selectionStartCol.
+        endLine := selectionEndLine.
+        endCol := selectionEndCol.
+        cCol := cursorCol.
+        cLine := cursorLine.
 
-	"
-	 cleanup: restore previous selection and cursor positions
-	"
-	cleanUp := [
-		self selectFromLine:selLine col:selCol toLine:endLine col:endCol.
-		cLine notNil ifTrue:[
-		    self cursorLine:cLine col:cCol
-		].
-	].
+        "
+         cleanup: restore previous selection and cursor positions
+        "
+        cleanUp := [
+                self selectFromLine:selLine col:selCol toLine:endLine col:endCol.
+                cLine notNil ifTrue:[
+                    self cursorLine:cLine col:cCol
+                ].
+        ].
 
-	"
-	 perform the action.
-	 Be careful to release the reference to the value;
-	 otherwise, we could keep lots of garbage from being freed
-	 until the view gets closed
-	"
-	self topView withCursor:Cursor execute do:[
-	    [
-		AbortSignal handle:[:ex |
-		     ex return
-		] do:[
-		    doItAction notNil ifTrue:[
-		        value := doItAction value:code asString.
-		        cleanUp value. cleanUp := nil.
-		        aBlock value:value.
-		    ]
-		]
-	    ] valueNowOrOnUnwindDo:[
-		cleanUp notNil ifTrue:[cleanUp value. cleanUp := nil].
-		value := nil
-	    ]
-	].
+        "
+         perform the action.
+         Be careful to release the reference to the value;
+         otherwise, we could keep lots of garbage from being freed
+         until the view gets closed
+        "
+        self topView withExecuteCursorDo:[
+            [
+                AbortSignal handle:[:ex |
+                     ex return
+                ] do:[
+                    doItAction notNil ifTrue:[
+                        value := doItAction value:code asString.
+                        cleanUp value. cleanUp := nil.
+                        aBlock value:value.
+                    ]
+                ]
+            ] valueNowOrOnUnwindDo:[
+                cleanUp notNil ifTrue:[cleanUp value. cleanUp := nil].
+                value := nil
+            ]
+        ].
     ]
+
+    "Modified: 14.12.1995 / 21:00:05 / cg"
 !
 
 inspectIt
@@ -522,4 +524,4 @@
 !Workspace class methodsFor:'documentation'!
 
 version
-^ '$Header: /cvs/stx/stx/libwidg/Workspace.st,v 1.34 1995-12-05 18:37:43 cg Exp $'! !
+^ '$Header: /cvs/stx/stx/libwidg/Workspace.st,v 1.35 1995-12-14 20:18:44 cg Exp $'! !