HierarchicalDropTargetController.st
changeset 3434 c5cb440dc848
parent 3379 060bb2feff4b
child 3756 c0660afa7da3
--- a/HierarchicalDropTargetController.st	Wed Jun 04 16:26:54 2008 +0200
+++ b/HierarchicalDropTargetController.st	Thu Jun 05 10:47:13 2008 +0200
@@ -66,9 +66,11 @@
     "return true, if the DropContext can be dropped into the list of items"
 
     dropOverLine isNil ifTrue:[ ^ false ].      "/ never setup by dropEnter:
+    canDropSelector isNil ifTrue:[ ^ false ].
 
-    canDropSelector isNil ifTrue:[ ^ false ].
-    ^ self performSelector:canDropSelector dropContext:aDropContext lineNr:dropOverLine.
+    ^ receiver 
+        perform:canDropSelector 
+        withOptionalArgument:aDropContext and:dropOverLine
 !
 
 drop:aDropContext
@@ -86,7 +88,10 @@
     self dropLeave:aDropContext.
 
     dropSelector isNil ifTrue:[ ^ false ].
-    ^ self performSelector:dropSelector dropContext:aDropContext lineNr:lnNr.
+
+    ^ receiver 
+        perform:dropSelector 
+        withOptionalArgument:aDropContext and:lnNr
 !
 
 dropEnter:aDropContext
@@ -207,7 +212,10 @@
     item canExpand ifFalse:[ ^ self ].
 
     canExpandSelector notNil ifTrue:[
-        (self performSelector:canExpandSelector dropContext:aDropContext lineNr:dropOverLine) ifFalse:[
+        (receiver 
+            perform:canExpandSelector 
+            withOptionalArgument:aDropContext and:dropOverLine) 
+        ifFalse:[
             ^ self
         ].
     ].
@@ -231,22 +239,10 @@
         item expand.
         view windowGroup processExposeEvents.
     ].
-!
-
-performSelector:aSelector dropContext:aDropContext lineNr:aLineNr
-    "perform a selector with optional arguments
-    "
-    |numArgs|
-
-    numArgs := aSelector numArgs.
-    numArgs == 0 ifTrue:[ ^ receiver perform:aSelector ].
-    numArgs == 1 ifTrue:[ ^ receiver perform:aSelector with:aDropContext ].
-
-    ^ receiver perform:aSelector with:aDropContext with:aLineNr
 ! !
 
 !HierarchicalDropTargetController class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalDropTargetController.st,v 1.2 2008-03-27 14:30:34 ab Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalDropTargetController.st,v 1.3 2008-06-05 08:47:13 cg Exp $'
 ! !