KeyboardForwarder.st
changeset 620 c840b7106a64
parent 612 8758d0c9933e
child 693 ed557e02b378
--- a/KeyboardForwarder.st	Sat Apr 27 19:53:57 1996 +0200
+++ b/KeyboardForwarder.st	Sat Apr 27 19:56:29 1996 +0200
@@ -103,63 +103,66 @@
 examples
 "
     catch an enterfields input:
-
-	|top field forwarder catcher|
+                                                                        [exBegin]
+        |top field forwarder catcher|
 
-	catcher := Plug new.
-	catcher respondTo:#keyPress:x:y:view:
-		    with:[:key :x :y :view | Transcript showCr:'cought keyPress: ' , key printString.].
-	catcher respondTo:#keyRelease:x:y:view:
-		    with:[:key :x :y :view | Transcript showCr:'cought keyRelease: ' , key printString.].
+        catcher := Plug new.
+        catcher respondTo:#keyPress:x:y:view:
+                    with:[:key :x :y :view | Transcript showCr:'cought keyPress: ' , key printString.].
+        catcher respondTo:#keyRelease:x:y:view:
+                    with:[:key :x :y :view | Transcript showCr:'cought keyRelease: ' , key printString.].
 
-	top := StandardSystemView new.
-	top extent:200@200.
+        top := StandardSystemView new.
+        top extent:200@200.
+
+        field := EditField in:top.
+        field origin:0.0@0.0; width:1.0.
 
-	field := EditField in:top.
-	field origin:0.0@0.0; width:1.0.
+        forwarder := KeyboardForwarder to:catcher. 
+        field delegate:forwarder.
 
-	forwarder := KeyboardForwarder to:catcher. 
-	field delegate:forwarder.
-
-	top open
+        top open
+                                                                        [exEnd]
 
 
     catch an enterfields return-key only:
-
-	|top field forwarder catcher|
+                                                                        [exBegin]
+        |top field forwarder catcher|
 
-	catcher := Plug new.
-	catcher respondTo:#keyPress:x:y:view:
-		    with:[:key :x :y :view | Transcript showCr:'cought return'].
+        catcher := Plug new.
+        catcher respondTo:#keyPress:x:y:view:
+                    with:[:key :x :y :view | Transcript showCr:'cought return'].
 
-	top := StandardSystemView new.
-	top extent:200@200.
+        top := StandardSystemView new.
+        top extent:200@200.
 
-	field := EditField in:top.
-	field origin:0.0@0.0; width:1.0.
+        field := EditField in:top.
+        field origin:0.0@0.0; width:1.0.
 
-	forwarder := KeyboardForwarder 
-			to:catcher 
-			condition:[:type :key :view | (type == #keyPress) & (key == #Return)].
-	field delegate:forwarder.
+        forwarder := KeyboardForwarder 
+                        to:catcher 
+                        condition:[:type :key :view | (type == #keyPress) & (key == #Return)].
+        field delegate:forwarder.
 
-	top open
+        top open
+                                                                        [exEnd]
 
 
     catch all of an enterfields input and ignore it:
-
-	|top field forwarder|
+                                                                        [exBegin]
+        |top field forwarder|
 
-	top := StandardSystemView new.
-	top extent:200@200.
+        top := StandardSystemView new.
+        top extent:200@200.
 
-	field := EditField in:top.
-	field origin:0.0@0.0; width:1.0.
+        field := EditField in:top.
+        field origin:0.0@0.0; width:1.0.
 
-	forwarder := KeyboardForwarder to:nil. 
-	field delegate:forwarder.
+        forwarder := KeyboardForwarder to:nil. 
+        field delegate:forwarder.
 
-	top open
+        top open
+                                                                        [exEnd]
 "
 ! !
 
@@ -428,5 +431,5 @@
 !KeyboardForwarder class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/KeyboardForwarder.st,v 1.14 1996-04-25 16:33:56 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/KeyboardForwarder.st,v 1.15 1996-04-27 17:56:29 cg Exp $'
 ! !