selection handling
authorClaus Gittinger <cg@exept.de>
Wed, 13 May 2009 23:42:56 +0200
changeset 2527 c953939a481e
parent 2526 29b49d1b4d53
child 2528 a6df49dfb157
selection handling
UIPainter.st
--- a/UIPainter.st	Wed May 13 23:42:46 2009 +0200
+++ b/UIPainter.st	Wed May 13 23:42:56 2009 +0200
@@ -4871,7 +4871,7 @@
 doBrowseAspectMethod:aspectSelector nameAs:aspectNameShown
     "browse or create the aspect method as entered in the field"
 
-    |cls spec aspect code implementingClass answer|
+    |cls spec aspect implementingClass answer|
 
     cls := self specClass.
     cls isNil ifTrue:[
@@ -4880,7 +4880,7 @@
     ].
 
     spec := painter specForSelection.
-    spec isNil ifTrue:[^ self].
+    spec isNil ifTrue:[self halt. ^ self].
 
     aspect := spec perform:aspectSelector.
     aspect isString ifFalse:[
@@ -4920,11 +4920,6 @@
 
         self doGenerateAspectMethodsForAll:(Array with:aspect).
         implementingClass := self painter targetClass.
-"/        code := painter
-"/            generateAspectMethodFor:aspect 
-"/            spec:spec 
-"/            inClass:cls.
-"/        code readStream fileIn.
 
         answer == #create ifTrue:[^ self].
     ] ifFalse:[
@@ -6434,10 +6429,10 @@
 
     |view item|
 
-    (view := aView) notNil ifTrue:[
-        [(item := self itemOfView:view) isNil] whileTrue:[
-            (view := view superView) isNil ifTrue:[^ listOfNodes at:1]
-        ].
+    (view := aView) isNil ifTrue:[ ^ nil ].
+
+    [(item := self itemOfView:view) isNil] whileTrue:[
+        (view := view superView) isNil ifTrue:[^ listOfNodes at:1]
     ].
     ^ item
 ! !