code cleanup: use #contains/#conform instead of explicit loop
authorClaus Gittinger <cg@exept.de>
Fri, 13 Oct 2006 13:03:11 +0200
changeset 2113 8e2be2823f9e
parent 2112 74dfb69c88d4
child 2114 eca72652fa9e
code cleanup: use #contains/#conform instead of explicit loop
MenuEditor.st
--- a/MenuEditor.st	Fri Oct 13 11:48:36 2006 +0200
+++ b/MenuEditor.st	Fri Oct 13 13:03:11 2006 +0200
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libtool2' }"
 
 ResourceSpecEditor subclass:#MenuEditor
@@ -2032,15 +2031,12 @@
     objects isEmpty ifTrue:[ ^ self ].  "/ nothing to drop ???
 
     "/ test whether all objects are dropable (kind of MenuItem)
-    objects do:[:el|
-        (el theObject askFor:#isMenuItem) ifFalse:[
-            "/ contains none-dropable objects
-            ^ self
-        ].
-    ].
-
-    "/ ok, the contents is dropable
-    dropOverLine := 0.
+    (objects conform:[:el | (el theObject askFor:#isMenuItem)]) ifTrue:[
+        "/ ok, the contents is dropable
+        dropOverLine := 0.
+    ]
+
+    "Modified: / 13-10-2006 / 12:57:06 / cg"
 !
 
 dropLeave:aContext