cursor #on: is obsoleted by #onDevice:.
authorClaus Gittinger <cg@exept.de>
Fri, 28 Mar 1997 13:52:47 +0100
changeset 1494 4faf11deec70
parent 1493 b162273f59f9
child 1495 d1934d676421
cursor #on: is obsoleted by #onDevice:.
Cursor.st
DSurface.st
DisplaySurface.st
SimpleView.st
WGroup.st
WindowGroup.st
--- a/Cursor.st	Thu Mar 27 17:15:30 1997 +0100
+++ b/Cursor.st	Fri Mar 28 13:52:47 1997 +0100
@@ -1863,9 +1863,19 @@
     "create a new Cursor representing the same cursor as
      myself on aDevice; if one already exists, return the one"
 
+    self obsoleteMethodWarning:'use #onDevice:'.
+    ^ self onDevice:aDevice
+
+    "Modified: 28.3.1997 / 13:47:02 / cg"
+!
+
+onDevice:aDevice
+    "create a new Cursor representing the same cursor as
+     myself on aDevice; if one already exists, return the one"
+
     aDevice isNil ifTrue:[
-	"this may not happen"
-	self error:'nil device'
+        "this may not happen"
+        self error:'nil device'
     ].
 
     "if I am already assigned to that device ..."
@@ -1873,27 +1883,28 @@
 
     "first look if not already there"
     Lobby do:[:aCursor |
-	(aCursor graphicsDevice == aDevice) ifTrue:[
-	    shape notNil ifTrue:[
-		(aCursor shape == shape) ifTrue:[
-		    ^ aCursor
-		]
-	    ] ifFalse:[
-		(aCursor sourceForm == sourceForm) ifTrue:[
-		    (aCursor maskForm == maskForm) ifTrue:[
-			(aCursor hotX == hotX) ifTrue:[
-			    (aCursor hotY == hotY) ifTrue:[
-				^ aCursor
-			    ]
-			]
-		    ]
-		]
-	    ]
-	]
+        (aCursor graphicsDevice == aDevice) ifTrue:[
+            shape notNil ifTrue:[
+                (aCursor shape == shape) ifTrue:[
+                    ^ aCursor
+                ]
+            ] ifFalse:[
+                (aCursor sourceForm == sourceForm) ifTrue:[
+                    (aCursor maskForm == maskForm) ifTrue:[
+                        (aCursor hotX == hotX) ifTrue:[
+                            (aCursor hotY == hotY) ifTrue:[
+                                ^ aCursor
+                            ]
+                        ]
+                    ]
+                ]
+            ]
+        ]
     ].
     ^ self newOn:aDevice
 
     "Modified: 5.7.1996 / 17:58:00 / cg"
+    "Created: 28.3.1997 / 13:46:38 / cg"
 ! !
 
 !Cursor methodsFor:'instance release'!
@@ -2046,6 +2057,6 @@
 !Cursor class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Cursor.st,v 1.46 1997-03-04 13:24:02 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Cursor.st,v 1.47 1997-03-28 12:51:20 cg Exp $'
 ! !
 Cursor initialize!
--- a/DSurface.st	Thu Mar 27 17:15:30 1997 +0100
+++ b/DSurface.st	Fri Mar 28 13:52:47 1997 +0100
@@ -287,7 +287,7 @@
         (aCursor ~~ cursor) ifTrue:[
             cursor := aCursor.
             drawableId notNil ifTrue:[
-                cursor := cursor on:device.
+                cursor := cursor onDevice:device.
                 cursor isNil ifTrue:[ ^ self].
                 id := cursor id.
                 id isNil ifTrue:[
@@ -319,7 +319,7 @@
     "
 
     "Created: 14.12.1995 / 21:28:00 / cg"
-    "Modified: 10.1.1997 / 17:48:22 / cg"
+    "Modified: 28.3.1997 / 13:47:58 / cg"
 !
 
 withCursor:aCursor do:aBlock
@@ -1417,9 +1417,9 @@
         viewBackground := viewBackground on:device
     ].
     super recreate.
-    cursor := cursor on:device.
+    cursor := cursor onDevice:device.
 
-    "Modified: 18.1.1997 / 18:09:44 / cg"
+    "Modified: 28.3.1997 / 13:48:06 / cg"
 !
 
 reinitStyle
@@ -1666,5 +1666,5 @@
 !DisplaySurface class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Attic/DSurface.st,v 1.28 1997-03-22 14:21:35 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Attic/DSurface.st,v 1.29 1997-03-28 12:51:39 cg Exp $'
 ! !
--- a/DisplaySurface.st	Thu Mar 27 17:15:30 1997 +0100
+++ b/DisplaySurface.st	Fri Mar 28 13:52:47 1997 +0100
@@ -287,7 +287,7 @@
         (aCursor ~~ cursor) ifTrue:[
             cursor := aCursor.
             drawableId notNil ifTrue:[
-                cursor := cursor on:device.
+                cursor := cursor onDevice:device.
                 cursor isNil ifTrue:[ ^ self].
                 id := cursor id.
                 id isNil ifTrue:[
@@ -319,7 +319,7 @@
     "
 
     "Created: 14.12.1995 / 21:28:00 / cg"
-    "Modified: 10.1.1997 / 17:48:22 / cg"
+    "Modified: 28.3.1997 / 13:47:58 / cg"
 !
 
 withCursor:aCursor do:aBlock
@@ -1417,9 +1417,9 @@
         viewBackground := viewBackground on:device
     ].
     super recreate.
-    cursor := cursor on:device.
+    cursor := cursor onDevice:device.
 
-    "Modified: 18.1.1997 / 18:09:44 / cg"
+    "Modified: 28.3.1997 / 13:48:06 / cg"
 !
 
 reinitStyle
@@ -1666,5 +1666,5 @@
 !DisplaySurface class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/DisplaySurface.st,v 1.28 1997-03-22 14:21:35 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/DisplaySurface.st,v 1.29 1997-03-28 12:51:39 cg Exp $'
 ! !
--- a/SimpleView.st	Thu Mar 27 17:15:30 1997 +0100
+++ b/SimpleView.st	Fri Mar 28 13:52:47 1997 +0100
@@ -5426,7 +5426,7 @@
         ].
 
         cursor notNil ifTrue:[
-            cursor := cursor on:device.
+            cursor := cursor onDevice:device.
         ].
 
         explicitExtent ~~ true ifTrue:[
@@ -5450,7 +5450,7 @@
         originChanged := true
     ]
 
-    "Modified: 15.7.1996 / 10:08:35 / cg"
+    "Modified: 28.3.1997 / 13:50:17 / cg"
 !
 
 createWithAllSubViews
@@ -6927,6 +6927,6 @@
 !SimpleView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.192 1997-03-27 10:06:14 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.193 1997-03-28 12:52:47 cg Exp $'
 ! !
 SimpleView initialize!
--- a/WGroup.st	Thu Mar 27 17:15:30 1997 +0100
+++ b/WGroup.st	Fri Mar 28 13:52:47 1997 +0100
@@ -1425,7 +1425,7 @@
         dev := aView graphicsDevice.
         dev notNil ifTrue:[
             (id := aView id) notNil ifTrue:[
-                c := aView cursor on:dev.
+                c := aView cursor onDevice:dev.
                 (cid := c id) notNil ifTrue:[
                     dev setCursor:cid in:id.
                 ]
@@ -1433,7 +1433,7 @@
         ]
     ].
 
-    "Modified: 28.5.1996 / 20:27:14 / cg"
+    "Modified: 28.3.1997 / 13:48:51 / cg"
 !
 
 showActivity:someMessage
@@ -1457,13 +1457,16 @@
 
     c := aCursor.
     self allViewsDo:[:aView |  
-        c := c on:(dev := aView graphicsDevice).
-        (id := c id) notNil ifTrue:[
-            dev setCursor:id in:aView id.
+        dev := aView graphicsDevice.
+        dev notNil ifTrue:[
+            c := c onDevice:dev.
+            (id := c id) notNil ifTrue:[
+                dev setCursor:id in:aView id.
+            ]
         ]
     ].
 
-    "Modified: 28.5.1996 / 20:27:17 / cg"
+    "Modified: 28.3.1997 / 13:49:34 / cg"
 !
 
 withCursor:aCursor do:aBlock
@@ -1578,6 +1581,6 @@
 !WindowGroup class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Attic/WGroup.st,v 1.110 1997-03-20 15:35:18 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Attic/WGroup.st,v 1.111 1997-03-28 12:51:58 cg Exp $'
 ! !
 WindowGroup initialize!
--- a/WindowGroup.st	Thu Mar 27 17:15:30 1997 +0100
+++ b/WindowGroup.st	Fri Mar 28 13:52:47 1997 +0100
@@ -1425,7 +1425,7 @@
         dev := aView graphicsDevice.
         dev notNil ifTrue:[
             (id := aView id) notNil ifTrue:[
-                c := aView cursor on:dev.
+                c := aView cursor onDevice:dev.
                 (cid := c id) notNil ifTrue:[
                     dev setCursor:cid in:id.
                 ]
@@ -1433,7 +1433,7 @@
         ]
     ].
 
-    "Modified: 28.5.1996 / 20:27:14 / cg"
+    "Modified: 28.3.1997 / 13:48:51 / cg"
 !
 
 showActivity:someMessage
@@ -1457,13 +1457,16 @@
 
     c := aCursor.
     self allViewsDo:[:aView |  
-        c := c on:(dev := aView graphicsDevice).
-        (id := c id) notNil ifTrue:[
-            dev setCursor:id in:aView id.
+        dev := aView graphicsDevice.
+        dev notNil ifTrue:[
+            c := c onDevice:dev.
+            (id := c id) notNil ifTrue:[
+                dev setCursor:id in:aView id.
+            ]
         ]
     ].
 
-    "Modified: 28.5.1996 / 20:27:17 / cg"
+    "Modified: 28.3.1997 / 13:49:34 / cg"
 !
 
 withCursor:aCursor do:aBlock
@@ -1578,6 +1581,6 @@
 !WindowGroup class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/WindowGroup.st,v 1.110 1997-03-20 15:35:18 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/WindowGroup.st,v 1.111 1997-03-28 12:51:58 cg Exp $'
 ! !
 WindowGroup initialize!