Point.st
changeset 1701 80d13adb2e77
parent 1354 0515d1ed37e4
child 2273 96cc7384fe80
--- a/Point.st	Tue Oct 08 20:32:31 1996 +0200
+++ b/Point.st	Tue Oct 08 20:34:08 1996 +0200
@@ -17,7 +17,7 @@
 	category:'Graphics-Geometry'
 !
 
-!Point class methodsFor:'documentation'!
+!Point  class methodsFor:'documentation'!
 
 copyright
 "
@@ -56,7 +56,7 @@
 "
 ! !
 
-!Point class methodsFor:'initialization'!
+!Point  class methodsFor:'initialization'!
 
 initialize
     PointZero isNil ifTrue:[
@@ -65,7 +65,7 @@
     ]
 ! !
 
-!Point class methodsFor:'instance creation'!
+!Point  class methodsFor:'instance creation'!
 
 r:distance angle:angle
     "create and return a new point given polar coordinates.
@@ -93,19 +93,23 @@
      skipping all whitespace first; return the value of exceptionBlock,
      if no point can be read."
 
-    |str newX newY|
+    ErrorSignal handle:[:ex |
+        ^ exceptionBlock value
+    ] do:[
+        |str newX newY|
 
-    str := aStringOrStream readStream.
+        str := aStringOrStream readStream.
 
-    newX := Number readFrom:str onError:nil.
-    newX notNil ifTrue:[
-	(str skipSeparators == $@) ifTrue:[
-	    str  next.
-	    newY := Number readFrom:str onError:nil.
-	    newY notNil ifTrue:[
-		^ self x:newX y:newY
-	    ]
-	]
+        newX := Number readFrom:str onError:nil.
+        newX notNil ifTrue:[
+            (str skipSeparators == $@) ifTrue:[
+                str  next.
+                newY := Number readFrom:str onError:nil.
+                newY notNil ifTrue:[
+                    ^ self x:newX y:newY
+                ]
+            ]
+        ].
     ].
     ^ exceptionBlock value
 
@@ -116,7 +120,7 @@
      Point readFrom:('fooBar' readStream) onError:[0@0]
     "
 
-    "Modified: 16.11.1995 / 22:50:45 / cg"
+    "Modified: 8.10.1996 / 19:31:39 / cg"
 !
 
 x:newX y:newY
@@ -148,7 +152,7 @@
     ^ (self basicNew) x:newX y:newY
 ! !
 
-!Point class methodsFor:'constants'!
+!Point  class methodsFor:'constants'!
 
 unity
     "return the neutral element for multiplication"
@@ -162,7 +166,7 @@
     ^ PointZero
 ! !
 
-!Point class methodsFor:'queries'!
+!Point  class methodsFor:'queries'!
 
 isBuiltInClass
     "return true if this class is known by the run-time-system.
@@ -899,9 +903,9 @@
     ^ self + anOffset
 ! !
 
-!Point class methodsFor:'documentation'!
+!Point  class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Point.st,v 1.38 1996-05-08 18:16:47 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Point.st,v 1.39 1996-10-08 18:34:08 cg Exp $'
 ! !
 Point initialize!