UIGalleryView.st
changeset 239 ce46eb6f92a5
parent 205 1188254dcbfc
child 240 3f0dfabbb14d
--- a/UIGalleryView.st	Sat Jul 26 18:42:37 1997 +0200
+++ b/UIGalleryView.st	Sat Jul 26 18:43:21 1997 +0200
@@ -492,16 +492,20 @@
 findObjectAtX:x y:y
     "find the origin/corner of the currentWidget
     "
-    |point id p e|
+    |point id p|
 
     point := Point x:x y:y.
     id    := inputView id.
 
     subViews do:[:v|
+	|pX pY|
+
         v ~~ inputView ifTrue:[
             p := device translatePoint:point from:id to:(v id).
-            (     p x >= 0 and:[p x <= v width
-             and:[p y >= 0 and:[p y <= v height
+	    pX := p x.
+	    pY := p y.
+            (     pX >= 0 and:[pX <= v width
+             and:[pY >= 0 and:[pY <= v height
              and:[(self findSpecFor:v) notNil]]]]
             ) ifTrue:[
                 ^ v
@@ -516,7 +520,7 @@
 findSpecFor:anObject
     "returns subspec assigned to instance or nil
     "
-    |name components spec|
+    |name|
 
     anObject notNil ifTrue:[
         name := anObject name.
@@ -556,7 +560,7 @@
 selection:anObject
     "selection changed
     "
-    |name spec|
+    |spec|
 
     selection ~~ anObject ifTrue:[
         self showUnselected.
@@ -636,14 +640,14 @@
 for:aView specification:aSpec
     "create drop object for a view derived from a specification
     "
-    |point extent root device|
+    |point extent root device dO|
 
     device := aView device.
     root   := device rootView.
     extent := aView extent.
     point  := device translatePoint:0@0 from:(aView id) to:(root id).
 
-    DisplayObject := nil.
+    dO := nil.
 
     (point x > 0 and:[point y > 0]) ifTrue:[
         point := point + extent.
@@ -652,15 +656,15 @@
             device sync.
             aView invalidate.
             aView windowGroup processExposeEvents.
-            DisplayObject := Image fromView:aView grab:false.
+            dO := Image fromView:aView grab:false.
         ]
     ].
-    DisplayObject isNil ifTrue:[
-        DisplayObject := Form extent:extent depth:1.
-        DisplayObject colorMap:(Array with:Color white with:Color black).
-        DisplayObject fill:(Color colorId:0).
-        DisplayObject paint:(Color colorId:1).
-        DisplayObject displayRectangleX:0 y:0 width:aView extent x height:aView extent y.
+    dO isNil ifTrue:[
+        dO := Form extent:extent depth:1.
+        dO colorMap:(Array with:Color white with:Color black).
+        dO fill:(Color colorId:0).
+        dO paint:(Color colorId:1).
+        dO displayRectangleX:0 y:0 width:aView extent x height:aView extent y.
     ].
     aSpec class == UISubSpecification ifTrue:[
         aSpec layout:(LayoutOrigin fromPoint:0@0)